Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
78 lines (77 loc) · 2.61 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
78 lines (77 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
exclude: '^(.*\.svg|\.kiro/)$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-executables-have-shebangs
name: Check executables have shebangs
- id: fix-byte-order-marker
name: Fix byte order marker
- id: check-case-conflict
name: Check case conflict
- id: check-json
name: Check json
- id: check-yaml
name: Check yaml
args: [--allow-multiple-documents, --unsafe]
- id: check-toml
name: Check toml
- id: check-merge-conflict
name: Check for merge conflicts
- id: check-added-large-files
name: Check for added large files
exclude: |
(?x)^(
^.*/package-lock.json |
)$
- id: end-of-file-fixer
name: Fix end of the files
- id: trailing-whitespace
name: Trim trailing whitespace
- id: mixed-line-ending
name: Mixed line ending
- id: detect-private-key
name: Detect private keys
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: Insert license header (typescript and javascript)
files: \.tsx$|\.ts$|\.js$|\.jsx$|\.scss$
args:
- --license-filepath
- ./license_header.txt
- --comment-style
- // # defaults to Python's # syntax, requires changing for typescript syntax.
- --detect-license-in-X-top-lines=3
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
name: Prettier
additional_dependencies:
- "prettier@^3.3.3"
- "@trivago/prettier-plugin-sort-imports"
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
name: ShellChecker
args: ["-x", "--severity=warning"]
types: [shell]
# Local
- repo: local
hooks:
- id: detect-empty-files
name: Detect Empty Files
entry: scripts/detect-empty-files.sh
language: system
pass_filenames: false
- id: verify-c2j-drift
name: Verify AWS CLI model is current
entry: scripts/m2m/verify-c2j-drift.sh
language: system
pass_filenames: false
files: ^(source/api-model/src/main/smithy/.*\.smithy|source/api-model/smithy-build-c2j\.json|scripts/m2m/internal/generate-c2j\.sh|scripts/m2m/verify-c2j-drift\.sh|docs/aws-cli-model/(service-2\.json|paginators-1\.json))$