Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to clippy style named codes #464

Merged
merged 22 commits into from
Oct 24, 2022
Merged

Convert to clippy style named codes #464

merged 22 commits into from
Oct 24, 2022

Conversation

Jake-Shadle
Copy link
Member

@Jake-Shadle Jake-Shadle commented Oct 24, 2022

Previously, each unique diagnostic that could be emitted by cargo-deny was given its own rustc-style identifier/code, eg S001. This is not super friendly, so instead all diagnostic ids follow the clippy style of short but descriptive strings eg S001 -> git-source-underspecified.

With this change users can now also use a similar mechanism as clippy to blanket increase (or decrease) the severity level of each diagnostic via the cmd line. For example, by default your configuration allows duplicates via bans.duplicates = 'warn', but before merging to your trunk you want to ensure no duplicates are used, so your CI can instead run cargo deny check -D duplicate to deny duplicates, overriding your configuration. Also similarly to clippy you can use -D warnings to turn all warnings to errors, or conversely, -A denied would allow all errors.

Resolves: #61
Resolves: #454

While testing I also noticed that the rustsec issue with pre-releases was fixed, so the bad code I added to detect and warn about them was no longer needed, so just removing that code resolved another issue.

Resolves: #455

This also adds a bunch of tests for the license check, they uhhh...haven't been covered in a while.

@Jake-Shadle Jake-Shadle merged commit ff2068a into main Oct 24, 2022
@Jake-Shadle Jake-Shadle deleted the cli/lints branch October 24, 2022 20:27
@Jake-Shadle Jake-Shadle mentioned this pull request Oct 24, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-releases are not distinguished from releases Ability to deny all warnings Add error names
1 participant