Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: third_party/pylint/reporters/text.py

Issue 202773002: Presubmit check improvements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« PRESUBMIT.py ('K') | « PRESUBMIT.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2003-2007 Sylvain Thenault (thenault@gmail.com). 1 # Copyright (c) 2003-2007 Sylvain Thenault (thenault@gmail.com).
2 # Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE). 2 # Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
3 # This program is free software; you can redistribute it and/or modify it under 3 # This program is free software; you can redistribute it and/or modify it under
4 # the terms of the GNU General Public License as published by the Free Software 4 # the terms of the GNU General Public License as published by the Free Software
5 # Foundation; either version 2 of the License, or (at your option) any later 5 # Foundation; either version 2 of the License, or (at your option) any later
6 # version. 6 # version.
7 # 7 #
8 # This program is distributed in the hope that it will be useful, but WITHOUT 8 # This program is distributed in the hope that it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 10 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
(...skipping 29 matching lines...) Expand all
40 40
41 __implements__ = IReporter 41 __implements__ = IReporter
42 extension = 'txt' 42 extension = 'txt'
43 43
44 def __init__(self, output=sys.stdout): 44 def __init__(self, output=sys.stdout):
45 BaseReporter.__init__(self, output) 45 BaseReporter.__init__(self, output)
46 self._modules = {} 46 self._modules = {}
47 47
48 def add_message(self, msg_id, location, msg): 48 def add_message(self, msg_id, location, msg):
49 """manage message of different type and in the context of path""" 49 """manage message of different type and in the context of path"""
50 module, obj, line, col_offset = location[1:] 50 path, module, obj, line, col_offset = location
51 if module not in self._modules: 51 if module not in self._modules:
52 if module: 52 if module:
53 self.writeln('************* Module %s' % module) 53 self.writeln('************* Module %s' % (path if path else modu le))
54 self._modules[module] = 1 54 self._modules[module] = 1
55 else: 55 else:
56 self.writeln('************* %s' % module) 56 self.writeln('************* %s' % module)
57 if obj: 57 if obj:
58 obj = ':%s' % obj 58 obj = ':%s' % obj
59 if self.include_ids: 59 if self.include_ids:
60 sigle = msg_id 60 sigle = msg_id
61 else: 61 else:
62 sigle = msg_id[0] 62 sigle = msg_id[0]
63 self.writeln('%s:%3s,%s%s: %s' % (sigle, line, col_offset, obj, msg)) 63 self.writeln('%s:%3s,%s%s: %s' % (sigle, line, col_offset, obj, msg))
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if obj: 146 if obj:
147 obj = ':%s' % obj 147 obj = ':%s' % obj
148 if self.include_ids: 148 if self.include_ids:
149 sigle = msg_id 149 sigle = msg_id
150 else: 150 else:
151 sigle = msg_id[0] 151 sigle = msg_id[0]
152 color, style = self._get_decoration(sigle) 152 color, style = self._get_decoration(sigle)
153 msg = colorize_ansi(msg, color, style) 153 msg = colorize_ansi(msg, color, style)
154 sigle = colorize_ansi(sigle, color, style) 154 sigle = colorize_ansi(sigle, color, style)
155 self.writeln('%s:%3s%s: %s' % (sigle, line, obj, msg)) 155 self.writeln('%s:%3s%s: %s' % (sigle, line, obj, msg))
OLDNEW
« PRESUBMIT.py ('K') | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698