Skip to content

Commit 819c572

Browse files
committed
Changed vs7 output format so that Visual Studio can parse the error messages correctly
Also Visual Studio can jump to the correct file/linenumber
1 parent 15f2836 commit 819c572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpplint/cpplint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,8 @@ def Error(filename, linenum, category, confidence, message):
12111211
if _ShouldPrintError(category, confidence, linenum):
12121212
_cpplint_state.IncrementErrorCount(category)
12131213
if _cpplint_state.output_format == 'vs7':
1214-
sys.stderr.write('%s(%s): %s [%s] [%d]\n' % (
1215-
filename, linenum, message, category, confidence))
1214+
sys.stderr.write('%s(%s): error cpplint: [%s] %s [%d]\n' % (
1215+
filename, linenum, category, message, confidence))
12161216
elif _cpplint_state.output_format == 'eclipse':
12171217
sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % (
12181218
filename, linenum, message, category, confidence))

0 commit comments

Comments
 (0)