blob: ed0cbd1df02f631c1e8d94fea2c99384d2a50259 [file] [log] [blame]
[email protected]a5b58f52009-11-17 22:15:441#!/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
9INCLUDE_CPP_FILES_ONLY = (
10 r'.*\.cc$', r'.*\.h$'
11)
12
13EXCLUDE = (
14 # Autogenerated window resources files are off limits
15 r'.*resource.h$',
16)
17
18def 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
[email protected]f9f41ec42010-06-28 17:48:5226
27def GetPreferredTrySlaves():
28 return ['win', 'linux', 'linux_view', 'linux_chromeos', 'mac']