Clippy configuration avoid-breaking-public-api #272
BartMassey
started this conversation in
API Guidelines
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Clippy has a "configuration variable"
avoid-breaking-exported-api
which is on by default. It inhibits a whole bunch of useful Clippy lints for the signatures of externally-visible items, on the grounds that changing them would be a semver breaking change. (It is also applied to binary crate items, which is almost certainly a mistake: I have filed an issue.)I think we could use a guideline that suggests adding a
clippy.toml
to the project within it when creating the project, then setting it to
true
after the API is stabilized, and then temporarily setting it tofalse
after making other breaking changes so that potential API-breaking lints can be reviewed and considered.(I don't like this approach: I will personally be permanently setting this variable to
false
in my projects, and monitoring API breaks "manually". I would strongly prefer a command-line argument to Clippy to set configuration variables, and would strongly prefer that this one default tofalse
. That said, it is what it is — that's a discussion for another repo.)I think most folks aren't even aware that Clippy's configuration mechanism even exists, much less that it is configured to ignore important API infelicities by default. I wasn't.
I'd be happy to put in a PR for this (with neutral language, of course) if folks think this is a good idea.
Beta Was this translation helpful? Give feedback.
All reactions