blob: 2ccee9bb551d1d9f849562dd3310a7a134459a59 [file] [log] [blame]
dan sinclair18540642018-06-05 21:36:50 -04001# Copyright (c) 2018 The Khronos Group Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Presubmit script for SPIRV-Tools.
16
17See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
18for more details about the presubmit API built into depot_tools.
19"""
20
21LINT_FILTERS = [
22 "-build/include",
23 "-build/include_order",
24 "-build/include_what_you_use",
25 "-build/namespaces",
26 "-readability/braces",
27 "-readability/casting",
28 "-readability/fn_size",
29 "-readability/todo",
30 "-runtime/explicit",
31 "-runtime/references",
32 "-whitespace/blank_line",
33 "-whitespace/ending_newline",
34 "-whitespace/line_length",
35 "-whitespace/newline",
36 "-whitespace/operators",
37 "-whitespace/parens",
38 "-whitespace/semicolon",
39 "-whitespace/todo"
40]
41
42
43def CheckChangeOnUpload(input_api, output_api):
44 results = []
45 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
46 results += input_api.canned_checks.CheckChangeLintsClean(
47 input_api, output_api, None, LINT_FILTERS)
48
49 return results