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

Side by Side Diff: build/android/lint/suppress.py

Issue 132463007: Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase vs tot and only disabling F0401 in specific spots Created 6 years, 10 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
« no previous file with comments | « build/android/lighttpd_server.py ('k') | build/android/pylib/android_commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Add all generated lint_result.xml files to suppressions.xml""" 7 """Add all generated lint_result.xml files to suppressions.xml"""
8 8
9 9
10 import collections 10 import collections
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 f.write(new_dom.toprettyxml(indent=' ', encoding='utf-8')) 94 f.write(new_dom.toprettyxml(indent=' ', encoding='utf-8'))
95 print 'Updated %s' % config_path 95 print 'Updated %s' % config_path
96 96
97 97
98 def _Suppress(config_path, result_path): 98 def _Suppress(config_path, result_path):
99 issues_dict = _ParseConfigFile(config_path) 99 issues_dict = _ParseConfigFile(config_path)
100 _ParseAndMergeResultFile(result_path, issues_dict) 100 _ParseAndMergeResultFile(result_path, issues_dict)
101 _WriteConfigFile(config_path, issues_dict) 101 _WriteConfigFile(config_path, issues_dict)
102 102
103 103
104 def main(argv): 104 def main():
105 parser = optparse.OptionParser(usage='%prog RESULT-FILE') 105 parser = optparse.OptionParser(usage='%prog RESULT-FILE')
106 _, args = parser.parse_args() 106 _, args = parser.parse_args()
107 107
108 if len(args) != 1 or not os.path.exists(args[0]): 108 if len(args) != 1 or not os.path.exists(args[0]):
109 parser.error('Must provide RESULT-FILE') 109 parser.error('Must provide RESULT-FILE')
110 110
111 _Suppress(_CONFIG_PATH, args[0]) 111 _Suppress(_CONFIG_PATH, args[0])
112 112
113 113
114 if __name__ == '__main__': 114 if __name__ == '__main__':
115 main(sys.argv) 115 main()
OLDNEW
« no previous file with comments | « build/android/lighttpd_server.py ('k') | build/android/pylib/android_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698