Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 pdfium. | 5 """Presubmit script for pdfium. |
| 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. | 8 for more details about the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 LINT_FILTERS = [ | 11 LINT_FILTERS = [ |
| 12 # Rvalue ref checks are unreliable. | |
| 12 '-build/c++11', | 13 '-build/c++11', |
| 14 # Need to fix header names not matching cpp names. | |
| 13 '-build/include', | 15 '-build/include', |
| 16 # Need to fix header names not matching cpp names. | |
| 14 '-build/include_order', | 17 '-build/include_order', |
| 15 '-build/include_what_you_use', | 18 # Too many to fix at the moment. |
| 16 '-build/namespaces', | |
| 17 '-build/storage_class', | |
| 18 '-readability/casting', | 19 '-readability/casting', |
| 20 # Need to refactor large methods to fix. | |
| 19 '-readability/fn_size', | 21 '-readability/fn_size', |
| 20 '-readability/todo', | 22 # Need to fix pdfium:426 |
|
Tom Sepez
2016/03/08 19:27:04
I thought you fixed this. Does this go away when
dsinclair
2016/03/08 21:08:01
Done.
| |
| 21 '-readability/utf8', | |
| 22 '-runtime/arrays', | |
| 23 '-runtime/casting', | 23 '-runtime/casting', |
| 24 # Need to fix errors when making methods explicit. | |
| 24 '-runtime/explicit', | 25 '-runtime/explicit', |
| 26 # Lots of usage to fix first. | |
| 25 '-runtime/int', | 27 '-runtime/int', |
| 28 # Need to fix two snprintf TODOs | |
| 26 '-runtime/printf', | 29 '-runtime/printf', |
| 30 # Lots of non const references need to be fixed | |
|
Tom Sepez
2016/03/08 19:27:04
nit: A truly picky person would say "non-const" bu
dsinclair
2016/03/08 21:08:01
Done.
| |
| 27 '-runtime/references', | 31 '-runtime/references', |
| 32 # Need to fix thread-unsafe methods to enable this. | |
|
Tom Sepez
2016/03/08 19:27:04
Actually, we can't support threads, so we don't ca
dsinclair
2016/03/08 21:08:01
Done.
| |
| 28 '-runtime/threadsafe_fn', | 33 '-runtime/threadsafe_fn', |
| 34 # Figure out how to deal with #defines that git cl format creates. | |
| 29 '-whitespace/indent', | 35 '-whitespace/indent', |
| 30 '-whitespace/line_length', | |
| 31 ] | 36 ] |
| 32 | 37 |
| 33 def CheckChangeOnUpload(input_api, output_api): | 38 def CheckChangeOnUpload(input_api, output_api): |
| 34 results = [] | 39 results = [] |
| 35 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) | 40 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) |
| 36 results += input_api.canned_checks.CheckChangeLintsClean( | 41 results += input_api.canned_checks.CheckChangeLintsClean( |
| 37 input_api, output_api, None, LINT_FILTERS) | 42 input_api, output_api, None, LINT_FILTERS) |
| 38 return results | 43 return results |
| OLD | NEW |