From 819c572b4ca4b7119047e8db673c034608f1a775 Mon Sep 17 00:00:00 2001 From: schoetbi Date: Wed, 3 May 2017 10:09:12 +0200 Subject: [PATCH] Changed vs7 output format so that Visual Studio can parse the error messages correctly Also Visual Studio can jump to the correct file/linenumber --- cpplint/cpplint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpplint/cpplint.py b/cpplint/cpplint.py index fafc243..949c510 100755 --- a/cpplint/cpplint.py +++ b/cpplint/cpplint.py @@ -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))