blob: eda670bc5a096bc5dbfe295da932e31ad9958bae [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"""
tfarina2a83d9f2014-12-12 02:32:5110
hendrikwdf64f7e2014-11-28 00:56:5411INCLUDE_CPP_FILES_ONLY = (
tfarina2a83d9f2014-12-12 02:32:5112 r'.*\.(cc|h)$',
13)
14
[email protected]5d723232014-03-04 22:19:4615def CheckChangeLintsClean(input_api, output_api):
hendrikwdf64f7e2014-11-28 00:56:5416 """Makes sure that the ui/app_list/ code is cpplint clean."""
tapted85b4387b2016-07-08 00:29:5617 black_list = input_api.DEFAULT_BLACK_LIST
hendrikwdf64f7e2014-11-28 00:56:5418 sources = lambda x: input_api.FilterSourceFile(
tfarina2a83d9f2014-12-12 02:32:5119 x, white_list = INCLUDE_CPP_FILES_ONLY, black_list = black_list)
hendrikwdf64f7e2014-11-28 00:56:5420 return input_api.canned_checks.CheckChangeLintsClean(
tfarina5d9e90912015-03-02 21:01:3421 input_api, output_api, sources, lint_filters=[], verbose_level=1)
[email protected]5d723232014-03-04 22:19:4622
[email protected]ee99b702014-02-18 03:54:1123def CheckChangeOnUpload(input_api, output_api):
24 results = []
[email protected]5d723232014-03-04 22:19:4625 results += CheckChangeLintsClean(input_api, output_api)
[email protected]ee99b702014-02-18 03:54:1126 return results