-
-
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
Add notes-rgx option for fixme checker #3394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @BennyTheSen Solid effort! Overall it looks great, but left a couple of comments to be addressed before we can merge this in.
doc/whatsnew/2.5.rst
Outdated
@@ -82,3 +82,5 @@ separated list of regexes, that if a name matches will be always marked as a bla | |||
* Add new --fail-under flag for setting the threshold for the score to fail overall tests. If the score is over the fail-under threshold, pylint will complete SystemExit with value 0 to indicate no errors. | |||
|
|||
* Add a new check (non-str-assignment-to-dunder-name) to ensure that only strings are assigned to ``__name__`` attributes | |||
|
|||
* Add a new option ``notes-rgx`` to make fixme warnings more flexible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mention here that either notes-rgx
or notes
can be used.
pylint/checkers/misc.py
Outdated
{ | ||
"type": "string", | ||
"metavar": "<regexp>", | ||
"default": ("a^"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have a default. Let's remove it from line 102.
pylintrc
Outdated
@@ -103,6 +103,8 @@ logging-modules=logging | |||
# List of note tags to take in consideration, separated by a comma. | |||
notes=FIXME,XXX,TODO | |||
|
|||
# Regular expression of note tags to take in consideration. | |||
notes-rgx=a^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed.
@@ -18,6 +18,15 @@ def function(): | |||
#FIXME: no space after hash | |||
# +1: [fixme] | |||
#todo: no space after hash | |||
|
|||
# +1: [fixme] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are some nice tests!
a2aefba
to
a1be981
Compare
Hey @PCManticore thanks for the input, I resolved your comments. |
Thanks a lot @BennyTheSen ! |
Steps
doc/whatsnew/<current release.rst>
.Description
This PR adds the option
notes-rgx
which can be used to flag the fixme warnings more flexible with a regex.Also extends the fixme functional test to include the
notes
and thenotes-rgx
optionType of Changes
Related Issue