cargo-semver-checks
cargo-semver-checks copied to clipboard
Lint level control
Sometimes it's useful to be able to change the alert level of specific lints for a particular item or an entire module. Clippy and rustc lints have already stabilized syntax like #[deny(lint_name)]
and #[allow(lint_name)]
, and our syntax choices would ideally be reasonably compatible with those.
The kinds of controls we'd like to include are:
- Forbid: change not allowed regardless of version bump
- Major change: only allowed in major version bumps
- Minor change: only allowed in minor version bumps
- Informational: allowed in all version bumps, but nevertheless reported; for example, if human judgment is necessary to determine whether the change is concerning or not
- Ignored: not reported at all
The lint level control adjustments should allow both raising and lowering the level of a given lint. For example:
- semver-minor lints should be possible to be upgraded to semver-major
- semver-major lints should be possible to be downgraded to semver-minor
- it should be possible to annotate an entire module as downgrading all semver lints to ignored / informational, e.g. in macro-only or explicitly-unstable modules.