blob: 108f84387c98a871dd7841dc7895e1eca1501861 [file] [log] [blame]
Jakub Sujak6e56bf32023-08-23 14:42:26 +01001# Copyright (c) 2023 Arm Limited.
2#
3# SPDX-License-Identifier: MIT
4#
5# Permission is hereby granted, free of charge, to any person obtaining a copy
6# of this software and associated documentation files (the "Software"), to
7# deal in the Software without restriction, including without limitation the
8# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9# sell copies of the Software, and to permit persons to whom the Software is
10# furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice shall be included in all
13# copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21# SOFTWARE.
Georgios Pinitasa7171102021-08-17 12:54:59 +010022fail_fast: false
23
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010024exclude: |
25 (?x)^(
26 data/.*|
27 include/.*|
28 src/CMakeLists.txt|
29 src/Bazel.build|
Jakub Sujak6e56bf32023-08-23 14:42:26 +010030 Android.bp|
31 src/core/NEON/kernels/convolution/.*|
32 src/core/NEON/kernels/arm_gemm/.*|
33 src/core/NEON/kernels/arm_conv/.*|
34 compute_kernel_writer/validation/.*
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010035 )$
36
Georgios Pinitasa7171102021-08-17 12:54:59 +010037repos:
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010038 - repo: local
Georgios Pinitasa7171102021-08-17 12:54:59 +010039 hooks:
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010040 - id: format-code
41 name: ACL Format Code Script
Georgios Pinitasa7171102021-08-17 12:54:59 +010042 stages: [commit]
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010043 language: python
44 entry: python ./scripts/format_code.py --files=git-diff
45 pass_filenames: false
46 additional_dependencies: ['psutil==5.8.0', 'Jinja2==3.0.1']
47 - id: prepare-cmake-build-files
48 name: Prepare CMake build files
Georgios Pinitasa7171102021-08-17 12:54:59 +010049 stages: [commit]
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010050 language: python
51 entry: python ./scripts/generate_build_files.py --cmake
52 pass_filenames: false
53 - id: prepare-bazel-build-files
54 name: Prepare Bazel build files
55 stages: [commit]
56 language: python
57 entry: python ./scripts/generate_build_files.py --bazel
58 pass_filenames: false
Gunes Bayiread57c22023-08-11 21:46:23 +010059 - id: fix-header-guards-ckw
60 name: Fix header guards in CKW
61 stages: [commit]
62 language: python
Jakub Sujak6e56bf32023-08-23 14:42:26 +010063 entry: python ./scripts/check_header_guards.py --extensions=h,hh,hpp,inl --comment_style=double_slash --prefix=CKW --include=compute_kernel_writer/ --add_extension --drop_outermost_subdir
Gunes Bayiread57c22023-08-11 21:46:23 +010064 pass_filenames: true
65 - id: fix-header-guards-acl
66 name: Fix header guards in ACL
67 stages: [commit]
68 language: python
Jakub Sujak6e56bf32023-08-23 14:42:26 +010069 entry: python ./scripts/check_header_guards.py --extensions=h,hh,hpp,inl --comment_style=double_slash --prefix=ACL --exclude=compute_kernel_writer/,src/core/NEON/kernels/convolution/,src/core/NEON/kernels/arm_gemm/,src/core/NEON/kernels/arm_conv/,include/ --add_extension
Gunes Bayiread57c22023-08-11 21:46:23 +010070 pass_filenames: true
Jakub Sujak6e56bf32023-08-23 14:42:26 +010071 - repo: https://github.com/pre-commit/mirrors-clang-format
72 rev: v14.0.6
73 hooks:
74 - id: clang-format
75 files: .*\.(cpp|h|hpp|hh|cc|inl|c)$
76 exclude: |
77 (?x)^(
78 tests/.*
79 )$
Gunes Bayir66b4a6a2023-07-01 22:55:42 +010080 - repo: https://github.com/pre-commit/pre-commit-hooks
81 rev: v4.4.0
82 hooks:
Georgios Pinitasa7171102021-08-17 12:54:59 +010083 - id: end-of-file-fixer
84 stages: [commit]
Georgios Pinitasa7171102021-08-17 12:54:59 +010085 - id: trailing-whitespace
86 stages: [commit]
87 - id: mixed-line-ending
88 args: ['--fix=lf']
89 description: Forces to replace line ending by the UNIX 'lf' character.
Georgios Pinitasa7171102021-08-17 12:54:59 +010090 - id: check-added-large-files
91 args: ['--maxkb=100']
92 stages: [commit]