mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Added cpplint.py output format for eclipse
Patch by mcasas@chromium.org CR: https://codereview.chromium.org/16140002/
This commit is contained in:
parent
4d70a88efd
commit
02c27fd836
7
cpplint/cpplint.py
vendored
7
cpplint/cpplint.py
vendored
|
@ -875,6 +875,9 @@ def Error(filename, linenum, category, confidence, message):
|
|||
if _cpplint_state.output_format == 'vs7':
|
||||
sys.stderr.write('%s(%s): %s [%s] [%d]\n' % (
|
||||
filename, linenum, message, category, confidence))
|
||||
elif _cpplint_state.output_format == 'eclipse':
|
||||
sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % (
|
||||
filename, linenum, message, category, confidence))
|
||||
else:
|
||||
sys.stderr.write('%s:%s: %s [%s] [%d]\n' % (
|
||||
filename, linenum, message, category, confidence))
|
||||
|
@ -3970,8 +3973,8 @@ def ParseArguments(args):
|
|||
if opt == '--help':
|
||||
PrintUsage(None)
|
||||
elif opt == '--output':
|
||||
if not val in ('emacs', 'vs7'):
|
||||
PrintUsage('The only allowed output formats are emacs and vs7.')
|
||||
if not val in ('emacs', 'vs7', 'eclipse'):
|
||||
PrintUsage('The only allowed output formats are emacs, vs7 and eclipse.')
|
||||
output_format = val
|
||||
elif opt == '--verbose':
|
||||
verbosity = int(val)
|
||||
|
|
Loading…
Reference in New Issue
Block a user