-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update docs and tooling to focus on LateLintPasses
#9311
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
I missed that Zulip chat but I think this update would make perfect sense. On the documentation side, could we maybe keep the Fully agree that |
That would also be an option, i think the important part is, that we clearly indicate when which version is better. And in the big majority the LateLintPass is even reauired. My goal with this suggestions is to simplify contributing a bit and prevent information overload. so if we find a way to simplify everything and keep both chapters that would be even better :)
I also like that. Either way, this should be a simple change 🙃 |
@xFrednet @flip1995 👋 Hey everyone, I'm happy to help with iterating over the docs aspect of this issue, i.e. editing and revamping the existing documentation for adding lints, especially switching to emphasis on Below is a draft outline I organized. Please review it and give your suggestions:
Note: Per suggestion from @xFrednet, we should also update Let me know what you think? :) |
I would make the adding lints section as short as possible. Instead of a big chapter about adding lints, I would introduce multiple chapters on how to do certain things and then link there. E.g. One chapter about testing, one about type checking, one about lint passes, and so on. The adding lints chapter should then only consist of the shortest "happy path" on how to add lints. All details and in depth information will be in the other chapters. My motivation for this approach is, that everything should be easy to find and not hidden in the adding lints chapter, like it currently is. Regarding the |
@flip1995 I like your suggestion :) How does this look? Did I miss any important bullets? (Edited to remove the
|
I didn't really have complaints about the first ToC you s'ent. My issue is that this is grouped under the adding lints chapter. Maybe my plan becomes clearer with a concrete example: Let's look at testing: there should be one chapter about all that exists for testing:
(not necessarily in that order) This chapter should be on the same level in the book as the adding lints chapter. Then in the testing section in adding lints it should only mention how to add and run ui tests and maybe the And each section in adding lints should be as short. it should be a brief cooking recipe on how to bake bread and not also include instructions on how to make a cake. |
Ah yes we're on the same page: I actually wanted to eliminate that |
I like @flip1995's suggestion as well. Thank you for working on the documentation ❤️ |
Ah ok, some of the things are still a bit too fine grained I think. But we can figure this out once the actual documentation is written. I wouldn't write two examples for both lint passes though. Just one for late lint passes and then link to the early vs late documentation. Content LGTM. Though, I would be careful not to duplicate things that already exist in the rustc-dev-guide. We can also just link to there instead of rewriting it ourselves. So before you start writing documentation for something, I would check the dev-guide. |
Our documentation currently still references the |
@flip1995 @xFrednet I edited/wrote a |
Hey @nahuakang awesome, looking forward to reading it! Do you maybe want to create a draft PR, so we can point out specific things, or do you just want feedback on the general style? 🙃 |
Just did :) It's just a short chapter because I want to know if the writing is in line with your preference before I write more 👍 |
@flip1995 @xFrednet 👋 Hope weekend is going well! I just pushed the |
Direct towards late passes in `cargo dev new_lint` changelog: none This would be the tooling part of #9311 - `--pass late` is now the default - It prints a message recommending the use of a late pass if you choose `--pass early`
Our documentation, how to add a lint, uses an
EarlyLintPass
for the example lint. However, most new lints use theLateLintPass
since they need type information from rustc. Since theLateLintPass
is the main one used for new lint, I suggest updating the documentation to focus on that pass and to update thecargo dev new_lint
tool to use theLateLintPass
by default.Related discussion on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Meeting.202022-08-09/near/292596176
I'll wait a bit until I do these changes, to potentially get additional feedback, but also because I don't have that much time rn 😅 🙃
The text was updated successfully, but these errors were encountered: