-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Raise strictness of linting #1477
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
Blocking for now, revisit this later. |
This is no longer blocked and therefore open to be worked on. |
I did a test run with medium strictness, and it outputs a lot, but it's On Thu, Aug 20, 2015 at 3:43 AM, Gregor Müllegger [email protected]
Eric Holscher |
We are still ignoring the Medium strictness is definitely worth it, pylint gives more useful errors at this level and beyond. We can tune some of the noise if we want. For instance, one that is used all over the place is the logging arguments error. I do prefer the Either way, we should be breaking this one out like we did the original linting, to avoid code rot. |
Also, any thoughts on docstrings? I suppose we should be settings good example and actually documenting everything, but there are a lot of cases where docstrings will be just noise. Do we want to say that if construct usage is very obvious, pylint ignore the line? I suppose at that point, a docstring is no more noisy than a line ignoring the docstring. |
I'm not a big fan of adding docstrings to every class and method. If it's a very simple and easy implementation, then the names of the arguments and the methodname will speak for itself. Nevertheless it is surely worth adding some docstrings (I had a hardtime getting behind the meaning of all the fields in the But I think there cannot be a automated rule on what needs to be documented, and what not. It would be more beneficially to review all of the existing code and add the corresponding docstrings where we think they are useful. |
I definitely agree. If we can be strict about documentation in review, then we don't need to automate this. If we did want to automate it, we might be able to find a regex pattern that reasonably matches what we should be documenting. Or maybe we set the It would be a benefit to have a linting requirement here, as I think the amount, quality, and attention to our reference docs is overall rather poor. If not for onboarding, we should at least be setting an example of good documentation practices |
Yes, let's try it. Turning it off will be possible anytime if it turns out to be hindering. |
+1, I bumped the minimum length to 20 lines, which sounded reasonable, we can see what sort of errors that accumulates. |
This is now partially in place, as a second pass to linting. Closing this discussion, we can add new issues for the actual cleanup. |
Once #1471, #1472, and #1473 are in place and we feel comfortable with the linting process, we should improve linting further by making the ruleset more strict. This can be managed by Prospector and some tuning of pylint rules, but increasing the strictness profile with Prospector. Additionally, we should consider enforcing stricter rules on line length, as discussed in #1424.
The text was updated successfully, but these errors were encountered: