Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

changeset 3635
fc024806236d
parent 3630
e32c3cec5d7e
child 3656
441956d8fce5
diff -r 869c7cb9dc15 -r fc024806236d Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Sun Jun 15 18:56:56 2014 +0200
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Mon Jun 16 18:27:11 2014 +0200
@@ -103,8 +103,14 @@
         # unicode string' exception on Python2
         codestring = normalizeCode(codestring)
         
-        # TODO: check for lines starting with VCS conflict markers
-        #       (7 * c for c in "<>=|") and report as 'error' like syntax check
+        # Check for VCS conflict markers
+        lineindex = 1
+        for line in codestring.splitlines():
+            if any(line.startswith(c * 7) for c in "<>=|"):
+                return [{'error':
+                    (file_enc, lineindex, 0, "", "VCS conflict marker found")
+                }]
+            lineindex += 1
         
         if filename.endswith('.ptl'):
             try:

eric ide

mercurial