101 |
101 |
102 # It also encode the code back to avoid 'Encoding declaration in |
102 # It also encode the code back to avoid 'Encoding declaration in |
103 # unicode string' exception on Python2 |
103 # unicode string' exception on Python2 |
104 codestring = normalizeCode(codestring) |
104 codestring = normalizeCode(codestring) |
105 |
105 |
106 # TODO: check for lines starting with VCS conflict markers |
106 # Check for VCS conflict markers |
107 # (7 * c for c in "<>=|") and report as 'error' like syntax check |
107 lineindex = 1 |
|
108 for line in codestring.splitlines(): |
|
109 if any(line.startswith(c * 7) for c in "<>=|"): |
|
110 return [{'error': |
|
111 (file_enc, lineindex, 0, "", "VCS conflict marker found") |
|
112 }] |
|
113 lineindex += 1 |
108 |
114 |
109 if filename.endswith('.ptl'): |
115 if filename.endswith('.ptl'): |
110 try: |
116 try: |
111 import quixote.ptl_compile |
117 import quixote.ptl_compile |
112 except ImportError: |
118 except ImportError: |