What is a lint rule made of? #12
Replies: 2 comments 26 replies
-
@peterhuene @adthrasher I want to discuss the implementations for Above, I say subject should be one sentence, but I think that slightly misses the mark because it leaves open the potential for run-on sentences that defeat the purpose of the field. We want
I'm not entirely sure how to define When we come to an agreement on this, I'll start a PR with whatever changes we decide. I will also update the PR/discussion templates and any other documentation to reflect the decisions reached here. Note, I have intentionally left out the discussion of |
Beta Was this translation helpful? Give feedback.
-
Adding my thoughts to the above as I'm now consolidating the lint rules and migrating them to the new AST representation. I think there should be separation between a rule and the diagnostics a rule can output, as it shouldn't need to be 1:1. Here's what I think is relevant to a rule:
I think we should create an mdbook for the rules, put it up on GitHub pages, and link to them from our rules via Here's what I think is relevant to a rule diagnostic, modeled off of other
Currently our diagnostic formatting is fairly verbose:
I think we can remove The Including the The Therefore, I propose we use a long format like:
and a short format like this (which corresponds to DisplayStyle::Short in
|
Beta Was this translation helpful? Give feedback.
-
Below are my thoughts on the necessary components of a lint rule. Ideally, whoever proposes a new rule would fully define each of the below pieces. Together, they can be implemented into a lint rule.
Ideally, everything listed here would make it into Rust; either as literal code or as part of doc strings. We should aim for having documentation which is parsed from the code. The code will be a dependable source of truth.
Beta Was this translation helpful? Give feedback.
All reactions