blob: 591fad1229fcb3f6207577c2f50d221257319237 [file] [log] [blame]
[email protected]ee99b702014-02-18 03:54:111# Copyright 2014 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.
4
5"""Presubmit script for app_list.
6
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8for more details about the presubmit API built into depot_tools.
9"""
hendrikwdf64f7e2014-11-28 00:56:5410INCLUDE_CPP_FILES_ONLY = (
11 r'.*\.cc$', r'.*\.h$'
12)
[email protected]5d723232014-03-04 22:19:4613
14def CheckChangeLintsClean(input_api, output_api):
hendrikwdf64f7e2014-11-28 00:56:5415 """Makes sure that the ui/app_list/ code is cpplint clean."""
16 sources = lambda x: input_api.FilterSourceFile(
17 x, white_list = INCLUDE_CPP_FILES_ONLY, black_list = None)
18 return input_api.canned_checks.CheckChangeLintsClean(
19 input_api, output_api, sources)
[email protected]5d723232014-03-04 22:19:4620
[email protected]ee99b702014-02-18 03:54:1121def CheckChangeOnUpload(input_api, output_api):
22 results = []
[email protected]5d723232014-03-04 22:19:4623 results += CheckChangeLintsClean(input_api, output_api)
[email protected]ee99b702014-02-18 03:54:1124 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
25 return results