crate-ci / azure-pipelines

Easy continuous integration for Rust projects with Azure Pipelines
MIT License
90 stars 24 forks source link

Allow specifying clippy parameters #83

Closed iceiix closed 3 years ago

iceiix commented 4 years ago

Adds a parameter to default.yml to allow changing the clippy configuration, allowing/denying/etc lints.

Note: this changes the default behavior, unsure if it is intended. The displayName in default.yml was set to "cargo clippy -- -D warnings", but the actual command executed was "cargo clippy --all". This PR changes the script to actually run with -D warnings (denying warnings), but it can be overridden by the user of the template.

jonhoo commented 4 years ago

Ah, good catch! It was definitely intended that -D warnings be passed to clippy. I'm not sure about exposing this as a parameter though. default.yml is intended to be an opinionated default, and I think it makes sense for that to include opting in to all default clippy lints. I think I'd prefer a PR that just fixed up the clippy command, and doesn't add a parameter :)