Skip to content

Commit

Permalink
Changed vs7 output format so that Visual Studio can parse the error m…
Browse files Browse the repository at this point in the history
…essages correctly

Also Visual Studio can jump to the correct file/linenumber
  • Loading branch information
schoetbi committed May 3, 2017
1 parent 15f2836 commit 819c572
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpplint/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,8 +1211,8 @@ def Error(filename, linenum, category, confidence, message):
if _ShouldPrintError(category, confidence, linenum):
_cpplint_state.IncrementErrorCount(category)
if _cpplint_state.output_format == 'vs7':
sys.stderr.write('%s(%s): %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
sys.stderr.write('%s(%s): error cpplint: [%s] %s [%d]\n' % (
filename, linenum, category, message, confidence))
elif _cpplint_state.output_format == 'eclipse':
sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
Expand Down

0 comments on commit 819c572

Please sign in to comment.