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

Add default lint level for default features #461

Merged
merged 6 commits into from
Oct 5, 2022
Merged

Conversation

Jake-Shadle
Copy link
Member

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

This PR changes the configuration of features, as, in #434, the configuration followed exactly what was proposed in #226, but on reflection that configuration would be super confusing, so now bans.features is its own top-level option.

This PR also adds two new configuration options, bans.workspace-default-features and bans.external-default-features which allows configuration of a default lint option for either workspace or external (non-workspace) crates. This default can then be overriden specifically for a crate, eg.

[bans]
workspace-default-features = 'deny'

[[bans.features]]
name = "a-workspace-crate"
allow = ["default"]

Would allow default features on a-workspace-crate, but deny them on any other workspace crate.

Also adds more testing of feature banning, to where I'm fairly confident this resolves #226.

Resolves: #206
Resolves: #226
Closes: #347

This allows configuration of the default lint level for default
features, split between workspace crates and external crates.
@Jake-Shadle Jake-Shadle merged commit 28676e9 into main Oct 5, 2022
@Jake-Shadle Jake-Shadle deleted the features/testing branch October 5, 2022 12:21
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.

Allow banning or requiring specific features. Add "default feature" check
1 participant