| 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 errors when making methods explicit. |
| 21 '-readability/utf8', | |
| 22 '-runtime/arrays', | |
| 23 '-runtime/explicit', | 23 '-runtime/explicit', |
| 24 # Lots of usage to fix first. |
| 24 '-runtime/int', | 25 '-runtime/int', |
| 26 # Need to fix two snprintf TODOs |
| 25 '-runtime/printf', | 27 '-runtime/printf', |
| 28 # Lots of non-const references need to be fixed |
| 26 '-runtime/references', | 29 '-runtime/references', |
| 30 # We are not thread safe, so this will never pass. |
| 27 '-runtime/threadsafe_fn', | 31 '-runtime/threadsafe_fn', |
| 32 # Figure out how to deal with #defines that git cl format creates. |
| 28 '-whitespace/indent', | 33 '-whitespace/indent', |
| 29 '-whitespace/line_length', | |
| 30 ] | 34 ] |
| 31 | 35 |
| 32 def CheckChangeOnUpload(input_api, output_api): | 36 def CheckChangeOnUpload(input_api, output_api): |
| 33 results = [] | 37 results = [] |
| 34 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) | 38 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) |
| 35 results += input_api.canned_checks.CheckChangeLintsClean( | 39 results += input_api.canned_checks.CheckChangeLintsClean( |
| 36 input_api, output_api, None, LINT_FILTERS) | 40 input_api, output_api, None, LINT_FILTERS) |
| 37 return results | 41 return results |
| OLD | NEW |