-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Clippy 1.0 #1358
Comments
I have been asked Sunday why/how the hell we got to 0.0.100 😄
So clippy 1.0.* would be for rustc 1.x, clippy 1.1.* for rustc 1.(x+1), etc.?
There probably is. I would like to merge/rename some lints before we get to stable. I looked at that once, but IIRC, the interface to rename lints is not available to us.
Don't think so.
Most likely. I did want to rewrite loop lints at some points because they have quite a lot of FP, but I haven't had much time. |
Nah, the stuff shipped with rustc will have arbitrary versions (may not even correspond to clippy published versions due to temporary rustup fixes). I haven't yet settled on how that will work, and this involves discussion with the rustup/rustc folks too. |
Regarding bikesheds, I say we move all controversial lints to allow by default (goodbye cyclomatic complexity my precious 😢) and the discuss them back into warn. Also I think that we need #1295 and #1313 before 1.0, since those seem to be a major blocker for team wide usage. Only cargo clippy is going into rustup, right? Or will the lints be autoloaded by the distributed rustc? |
I have already started working on #1295, I'll try to finish that soonish. |
Oui.
Good idea. I'd prefer to just get them discussed first, and if there are any which haven't been discussed we move them to allow. |
FWIW I've added a C-1.0-blocking label for things (like lint renames) that must happen before 1.0. It is not an exhaustive list right now. Feel free to apply liberally. |
A bikeshed on Reddit suggested changing the name from Personally I superficially agree and also note that the Some projects using standard "lint" naming:
Some projects referring to "linting" but using different names:
|
I'm personally not opposed to renaming but one problem that comes to mind is: If we want to rename the command to I think calling Clippy by using |
Yeah, the point of Clippy is specifically to house the more annoying lints (of various levels of annoyingness). I've considered cargo lint in the past and it gets confusing. I think it's fine if folks don't get the reference, it's still a nice, short, memorable tool name. |
I think clippy is a great name for this project and wouldn't suggest changing it, but I'm somewhat concerned about the overall Rust + cargo interface implications of what's happened here. I know this is implemented as a custom subcommand, but if we start shipping this component by default, we've functionally added a new (official) subcommand to cargo. Is that the intention for devtools in general? - any new devtool with a CLI will just be accessed by a If we are going to eventually ship clippy by default, I'd be more comfortable with some sort of unified I don't care about the interface to the |
Thanks @LegNeato for investigating conventions from other languages. As mentioned in the reddit comment quoted below:
I think the question is whether it is necessary to break the established convention of official cargo subcommand naming by using "clippy". Following the convention of using straightforward descriptive name also makes it easier for those coming from other languages (e.g. golang), or people not knowing the Microsoft insider jokes to grok what this command does. |
Following on the bikeshedding path of renaming
Coach gives instant feedback before going live (submitting a PR, releasing), and teaches you best practices as you learn Rust. As you get better you need less coaching but it's always there if you need a quick opinion. It's essentially constructive, and shouldn't (I believe) block you from doing whatever, contrarily to lints which could be prescriptive and fail the build. It's also a subtle play on the cargo "transportation" theme. And it retains the cool consonance that |
@fralalonde Let's not get into name bikeshedding, please. The question is whether the name needs to become more descriptive, not whether the name should change to some other fanciful/metaphorical name. I like @withoutboats suggestion here: let's keep For that matter, I wonder if we should have a (configurable) way for |
At the risk of sounding dense (I am not super familiar with Rust's linting though I worked on a lot of lint stuff at Facebook) why make the distinction of user-defined vs clippy lints vs rustc lints at all? I agree with @withoutboats that these should have a unified user experience. Where the lint came from and what tool is doing the linting is an implementation detail most developers do not care about or need to know. For example, at Facebook when you run Everywhere I have ever worked there has been one interface to run all lints with standard ways to turn them on and off (per-line/file/project/invocation) regardless of where they originated. So I guess concretely for 1.0...I would suggest shipping clippy by default with rust, default all checks to off, use standard generic linting attributes and config file that do not refer to clippy, etc. Basically decouple the project name from the developer UI. |
Since we were citing prior work, in the Java world there's FindBugs/SpotBugs, CheckStyle,PMD, SonarQube. |
That's not my position. I think this project should be called clippy, but I'm not convinced that One possible approach is to have some |
As a first step we can remove |
I feel like it's better if we let rustup distribute it for now -- there's
nothing gained from making the installation have that step imo.
…On Tue, Oct 9, 2018, 11:08 PM Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer < ***@***.***> wrote:
As a first step we can remove cargo-clippy from rustup and only
distribute clippy-driver. Then users can install the cargo clippy
subcommand themselves until we figure out the details here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1358 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABivSF03LmQxccvVIwVi-5u0SEIPlEJ9ks5ujY7GgaJpZM4K7C6B>
.
|
I don't think there are any unresolved questions here. Clippy is distributed and versioned with the rust toolchain. |
So I'm thinking of doing a clippy 1.0 soon.
The idea will be to make a users.rlo post asking for feedback that needs to get in before 1.0, after which the semantics of existing lints will be somewhat frozen (can be changed, but needs more discussion). IMO warnings don't qualify as breaking changes anyway, so this isn't a rigid restriction.
However, what I'd like to get figured out before we land:
The idea of 1.0 in my mind is that clippy is "ready". Folks have been using it for more than a year now, and this is something we probably should have done ages ago. This just marks it as something we're confident in telling others to use extensively.
This bug is mostly to track progress and to decide if there are any objections to going 1.0. The points listed above will be discussed when I make the internals posts, but can be discussed here if major.
Once we release 1.0 my plan is to try pushing for it to be included as a rustup component so that it can be used on stable.
Thoughts?
cc @llogiq @mcarton @oli-obk @birkenfeld
The text was updated successfully, but these errors were encountered: