-
Notifications
You must be signed in to change notification settings - Fork 1
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
comments for lint config #3
Comments
Is CLI support needed for an initial implementation? It adds some unique complications and most lint levels should probably be declarative.
Can these even be supported? I believe registering custom tools is unstable
We support it syntactically but nothing was using it until rust-lang/cargo#13913
There is disagreement on whether we'd even support registering lints in the same way as rustc. Overall, the value is a lot lower due to our different model of operating.
I could see copy/pasting the code or maybe even generalizing it so you get to reuse the precedence calculations. Maybe it could be a separate library for you to pull in? Probably best to copy/paste initially to not block yourself and then, if it makes sense, you could contribute to cargo to generalize the API so you could switch away from a copy/pasted version. |
Nice writeup! Re: CLI support, I think the work you did analyzing the existing design of Rust-ecosystem tool CLIs is invaluable, and you've identified the key challenges there. This is great because it means we don't have to implement CLI support on day 1, and instead can design our approach to allow it to be built and plugged in in the future. So I'd probably recommend not building in on day 1, and instead investing our effort toward having manifest-based config shipped sooner. Re: precedence, we currently don't have the concept of lint groups nor item- or module-level config, so the precedence calculations should be straightforward: for each lint, use the defaults, overridden by whatever the workspace says (if anything), overridden by whatever the package manifest says (if anything). I'm sure this will need to become more sophisticated in the future, but it's not a problem we have to solve it on day 1 if it's not easy to solve. |
@epage Technically yes, courtesy of the guarantees of the new There's discussion about making a similar See thread here: |
https://blog.mcarr.one/rust-lint-config/
The text was updated successfully, but these errors were encountered: