blob: 3afea727ccf7dcb99471aa4e60f0b7aea20ce408 [file] [log] [blame]
Hector Dearman534765e2017-11-01 11:17:38 +00001# Copyright (C) 2017 The Android Open Source Project
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
15def CheckChange(input, output):
16 results = []
17 results += input.canned_checks.CheckDoNotSubmit(input, output)
18 results += input.canned_checks.CheckChangeHasNoTabs(input, output)
19 results += input.canned_checks.CheckLongLines(input, output, 80)
20 results += input.canned_checks.CheckPatchFormatted(input, output)
21 results += input.canned_checks.CheckGNFormatted(input, output)
22 return results
23
24def CheckChangeOnUpload(input_api, output_api):
25 return CheckChange(input_api, output_api)
26
27def CheckChangeOnCommit(input_api, output_api):
28 return CheckChange(input_api, output_api)
29