OLD | NEW |
1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Presubmit script for Chromium WebUI resources. | 5 """Presubmit script for Chromium WebUI resources. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into depot_tools, and see | 8 for more details about the presubmit API built into depot_tools, and see |
9 https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md | 9 https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md |
10 for the rules we're checking against here. | 10 for the rules we're checking against here. |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 error += check['after'](line) | 423 error += check['after'](line) |
424 check_errors.append(error) | 424 check_errors.append(error) |
425 if len(check_errors) > 0: | 425 if len(check_errors) > 0: |
426 file_errors.append('- %s\n%s' % | 426 file_errors.append('- %s\n%s' % |
427 (check['desc'], '\n'.join(check_errors))) | 427 (check['desc'], '\n'.join(check_errors))) |
428 if file_errors: | 428 if file_errors: |
429 results.append(self.output_api.PresubmitPromptWarning( | 429 results.append(self.output_api.PresubmitPromptWarning( |
430 '%s:\n%s' % (f[0], '\n\n'.join(file_errors)))) | 430 '%s:\n%s' % (f[0], '\n\n'.join(file_errors)))) |
431 | 431 |
432 return results | 432 return results |
OLD | NEW |