-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature Request] new lint rule for declaring variables to have #declare or #var comment #11764
Comments
Hi again! It worries me that you've copied this issue from pylint-dev/pylint#9685. Regardless, as before, I'm happy for this to be a place for discussion but this is very similar in style to #11698 and we are unlikely to implement it. I can expand on that a bit if it's helpful: Rules that go beyond established language conventions are unlikely to be used by most users. In some cases, they may be actively confusing. If you want to push for adoption of a change like this, a linter is not the right place to start. Instead, you'll want to actually use this in projects and demonstrate that it adds clarity to the language. Before we can consider rules that enforce an annotation, we'd want to see projects using it successfully. I actually think things like what you're asking for here and in #11698 sound better off as editor integrations rather than things that are included in the source code itself (either manually or with a linter). |
Hello, |
The proposals can be separate, but they're both using Python comments as "markers" which is not something we encourage.
Why not just have the editor show these markers without including them in the source code?
Unfortunately we can't go on theory here. Until there are major projects following your proposed design, we won't be implementing enforcement of it. |
I prefer lint rules and not just editor stylings as lint rules allow checking and enforcing the code while editor side doesn't do checks on code. Also editors and editor plugins are usually developer specific while lint rules are project specific that developers need to follow for project development. |
Regarding |
Thanks for the proposal but I'm gonna close as unlikely to implement per @zanieb's comments above. |
create a new lint rule for variable when they are first declared to be followed by #var or #declare or word configured by project developers.
Example:
OR
The text was updated successfully, but these errors were encountered: