Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py

changeset 5172
f35c7e0db572
parent 5147
d39dd5cee0c8
child 5389
9b1c800daff3
diff -r f1e9eebd5469 -r f35c7e0db572 Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py	Fri Sep 16 19:28:39 2016 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py	Fri Sep 16 19:31:38 2016 +0200
@@ -272,8 +272,10 @@
         errors.sort(key=lambda x: x[0], reverse=True)
         for position, text in errors:
             if source:
-                if "__IGNORE_WARNING__" not in \
-                        extractLineFlags(source[lineno - 1].strip()):
+                code = text[0]
+                lineFlags = extractLineFlags(source[lineno - 1].strip())
+                if "__IGNORE_WARNING__" not in lineFlags and \
+                        "__IGNORE_WARNING_{0}__".format(code) not in lineFlags:
                     if fixer:
                         res, msg, id_ = fixer.fixIssue(lineno, position, text)
                         if res == -1:

eric ide

mercurial