| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/python | |
| 2 | |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 """Makes sure that the app/ code is cpplint clean.""" | |
| 8 | |
| 9 INCLUDE_CPP_FILES_ONLY = ( | |
| 10 r'.*\.cc$', r'.*\.h$' | |
| 11 ) | |
| 12 | |
| 13 EXCLUDE = ( | |
| 14 # Autogenerated window resources files are off limits | |
| 15 r'.*resource.h$', | |
| 16 ) | |
| 17 | |
| 18 def CheckChangeOnUpload(input_api, output_api): | |
| 19 results = [] | |
| 20 black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDE | |
| 21 sources = lambda x: input_api.FilterSourceFile( | |
| 22 x, white_list=INCLUDE_CPP_FILES_ONLY, black_list=black_list) | |
| 23 results.extend(input_api.canned_checks.CheckChangeLintsClean( | |
| 24 input_api, output_api, sources)) | |
| 25 return results | |
| 26 | |
| 27 def GetPreferredTrySlaves(): | |
| 28 return ['win', 'linux', 'linux_view', 'linux_chromeos', 'mac'] | |
| OLD | NEW |