1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 """Makes sure that the chrome/ code is cpplint clean."""
7 INCLUDE_CPP_FILES_ONLY
= (
12 # Objective C confuses everything.
16 # All the messages files do weird multiple include trickery
17 r
'.*_messages_internal\.h$',
18 r
'render_messages.h$',
19 # Autogenerated window resources files are off limits
21 # GTK macros in C-ish header code cause false positives
26 r
'sigslotrepeater\.h$',
27 # GCC attribute trickery
32 r
'nss_decryptor_linux\.cc$',
33 # Has safe printf usage that cpplint complains about
34 r
'safe_browsing_util\.cc$',
35 # Too much math on one line?
38 r
'renderer_webkitclient_impl\.cc$',
43 def CheckChangeOnUpload(input_api
, output_api
):
45 black_list
= input_api
.DEFAULT_BLACK_LIST
+ EXCLUDE
46 sources
= lambda x
: input_api
.FilterSourceFile(
47 x
, white_list
=INCLUDE_CPP_FILES_ONLY
, black_list
=black_list
)
48 results
.extend(input_api
.canned_checks
.CheckChangeLintsClean(
49 input_api
, output_api
, sources
))