| OLD | NEW |
| 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 """Runs Android's lint tool.""" | 7 """Runs Android's lint tool.""" |
| 8 | 8 |
| 9 | 9 |
| 10 import optparse | 10 import optparse |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 ' - Wanna suppress these issues?\n' | 103 ' - Wanna suppress these issues?\n' |
| 104 ' 1. Read comment in %s\n' | 104 ' 1. Read comment in %s\n' |
| 105 ' 2. Run "python %s %s"\n' % | 105 ' 2. Run "python %s %s"\n' % |
| 106 (num_issues, | 106 (num_issues, |
| 107 _RelativizePath(result_path), | 107 _RelativizePath(result_path), |
| 108 _RelativizePath(config_path), | 108 _RelativizePath(config_path), |
| 109 _RelativizePath(os.path.join(_SRC_ROOT, 'build', 'android', | 109 _RelativizePath(os.path.join(_SRC_ROOT, 'build', 'android', |
| 110 'lint', 'suppress.py')), | 110 'lint', 'suppress.py')), |
| 111 _RelativizePath(result_path))) | 111 _RelativizePath(result_path))) |
| 112 print >> sys.stderr, msg | 112 print >> sys.stderr, msg |
| 113 return 1 | 113 # Lint errors do not fail the build. |
| 114 return 0 |
| 114 | 115 |
| 115 return 0 | 116 return 0 |
| 116 | 117 |
| 117 | 118 |
| 118 def main(argv): | 119 def main(argv): |
| 119 parser = optparse.OptionParser() | 120 parser = optparse.OptionParser() |
| 120 parser.add_option('--lint-path', help='Path to lint executable.') | 121 parser.add_option('--lint-path', help='Path to lint executable.') |
| 121 parser.add_option('--config-path', help='Path to lint suppressions file.') | 122 parser.add_option('--config-path', help='Path to lint suppressions file.') |
| 122 parser.add_option('--processed-config-path', | 123 parser.add_option('--processed-config-path', |
| 123 help='Path to processed lint suppressions file.') | 124 help='Path to processed lint suppressions file.') |
| (...skipping 25 matching lines...) Expand all Loading... |
| 149 options.product_dir, src_dirs, options.classes_dir) | 150 options.product_dir, src_dirs, options.classes_dir) |
| 150 | 151 |
| 151 if options.stamp and not rc: | 152 if options.stamp and not rc: |
| 152 build_utils.Touch(options.stamp) | 153 build_utils.Touch(options.stamp) |
| 153 | 154 |
| 154 return rc | 155 return rc |
| 155 | 156 |
| 156 | 157 |
| 157 if __name__ == '__main__': | 158 if __name__ == '__main__': |
| 158 sys.exit(main(sys.argv)) | 159 sys.exit(main(sys.argv)) |
| OLD | NEW |