This is expressed pretty nicely, thank you. I was struggling to express this in my other comment. rustc has all the lints which:
- Everyone mostly agrees upon
- Have rare false positives
- Are of the kind you'd expect from a good compiler
It doesn't have 150 lints because 150 lints would be annoying, and would drown out the "important" lints. I work on clippy, and I find this distinction very useful. When rustc tells you to fix something, you fix it. Clippy lints help /inform/, and you may ignore them often. But you don't always need to listen to clippy. If I wrote a bot that fixed all rustc warnings I'm sure people would be fine with just blindly running it. I cannot say the same about clippy (not because of bugs), and that's a good thing.
The plan instead is to polish clippy and distribute it via rustup.
Yes, you can add new lints with an RfC. However, the bar for inclusion is very high.
I'm totally okay with the status quo, but I very much disagree that there is scope for uplifting lints to rustc from clippy with the current policies.
On one hand, I see how it is annoying when a compiler complains about code patterns that are not worth errors and could be false positives. OTOH, I feel like a language designed for safety should try to warn about as many bugs as possible. Would any of clippy's lints pass every Rust crate tested on Crater? Maybe those could be come rustc errors.
For fun:
Lint, a C Program Checker (1977)
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.1841
The separation of function between lint and the C compilers has both historical and practical rationale. The compilers turn C programs into executable files rapidly and efficiently. This is possible in part because the compilers do not do sophisticated type checking, especially between separately compiled programs. Lint takes a more global, leisurely view of the program, looking much more carefully at the compatibilities.lolnope
Well, there are lint-checking-lints, and there are very few linters out there, and clippy passes clippy, so those would pass. A couple other obscure lints that check for things that in practice never happen. Too obscure to be included in rustc I guess.
IMO a lint passing all of crater is a very good reason for it to not be included in rustc.
So instead of choosing a large feature set at the beginning and the box it through, they choose to have a more thin compiler, standard library etc. but make it extendable, so that it can be extended and integrate with other systems. Also you should not forget that Rust is still very young for a programming language so cargo is everything but done. Cargo is more a unified interface combining the compiler and the crates package repository than a full fledged build system. Given the available resources and time for building rust, I thing choosing to (for now) not include a fist class rust coverage system, debugger etc. is a sane choice, especially because all this things are available as external tools (debugger=gdb, coverage=kcov, etc.).
Also there are discussions/issues about enabling the integration with "enterprise" build systems, they just currently don't have a high priority and happen mostly in the background. So it's probably just a matter of time until you can use rust with a "enterprise" build system like Bazel.
Wrt. clippy integration in rust, it is mostly about keeping the compiler smaller and easier to maintain. Through it should be noted, that all "important" lints are in rustc, clippy just provides more useful ones. By keeping both projects separated it is possible to iterate both of them independent of the other. Which can be quite useful in open source development. Also don't enterprise systems also have a separate linter? (And no "better code" is not better code for every one, as the definition for what good code is can change quite a bit depending on the person, e.g. wrt. variable shadowing)
Lastly I don't think your reasoning about peers holds, you don't really have the choice to be selective about people working on the project, at last not if you have open source project on the scale of rust. Through you might be able to have more strict requirements for code quality. Nevertheless given how rustc catches a lot of possible bugs, and how to community is, I would be surprised if there would not be some less experienced programmers contributing to the compiler. But then at last Mozilla also uses rust in production, so some parts have deadlines and even if not it's quite different for them then a `A-game`classification. Also it's not so, that you can't have metrics about lines/branch coverage, failed the build on certain thresholds, etc. It's just not necessary a build-in feature, through available nevertheless. Also it would be really strange if a programming language / build tool would decide which amount of coverage is ok, it's something the project manager/programmer has to decide (once) and then configure the build tool to enforce it (I most likely did misunderstood you on the last line ;-) ).
Ups, I wrote much to much.
TL;TR: 1) rust has less (programmer) resources 2) it's still young, tools like cargo, or the testing API are everything but complete. Through they do there job good enough for now.