diff options
author | cpopa <devnull@localhost> | 2014-08-11 17:46:40 +0300 |
---|---|---|
committer | cpopa <devnull@localhost> | 2014-08-11 17:46:40 +0300 |
commit | 94b27962a5ebe5d9dfbbdaf87546754a88b7168a (patch) | |
tree | 67e95675b86f74fe4101743a77becee9a28ea50a | |
parent | 723207b6a03e35cab88d6014125808592fce9176 (diff) | |
download | pylint-94b27962a5ebe5d9dfbbdaf87546754a88b7168a.tar.gz |
fixme regex handles comments without spaces after the hash. Closes issue #311.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | checkers/misc.py | 2 | ||||
-rw-r--r-- | test/input/func_fixme.py | 1 | ||||
-rw-r--r-- | test/messages/func_fixme.txt | 3 |
4 files changed, 7 insertions, 2 deletions
@@ -54,6 +54,9 @@ ChangeLog for Pylint strings contains duplicate manual position arguments. Closes issue #310. + * fixme regex handles comments without spaces after the hash. + Closes issue #311. + 2014-07-26 -- 1.3.0 * Allow hanging continued indentation for implicitly concatenated diff --git a/checkers/misc.py b/checkers/misc.py index b4738b0..b53f882 100644 --- a/checkers/misc.py +++ b/checkers/misc.py @@ -74,7 +74,7 @@ class EncodingChecker(BaseChecker): stream.seek(0) # XXX may be removed with astroid > 0.23 if self.config.notes: notes = re.compile( - r'.*?#\s+(%s)(:*\s*.+)' % "|".join(self.config.notes)) + r'.*?#\s*(%s)(:*\s*.+)' % "|".join(self.config.notes)) else: notes = None if module.file_encoding: diff --git a/test/input/func_fixme.py b/test/input/func_fixme.py index 66e86db..9210be6 100644 --- a/test/input/func_fixme.py +++ b/test/input/func_fixme.py @@ -12,3 +12,4 @@ def function(): # TODO: Do something with the variables xxx = "n/a" # XXX: Fix this later + #FIXME: no space after hash diff --git a/test/messages/func_fixme.txt b/test/messages/func_fixme.txt index 88199a7..deade52 100644 --- a/test/messages/func_fixme.txt +++ b/test/messages/func_fixme.txt @@ -1,4 +1,5 @@ W: 5: FIXME: beep W: 11: FIXME: Valid test W: 13: TODO: Do something with the variables -W: 14: XXX: Fix this later
\ No newline at end of file +W: 14: XXX: Fix this later +W: 15: FIXME: no space after hash
\ No newline at end of file |