File tree Expand file tree Collapse file tree 4 files changed +62
-1
lines changed
Expand file tree Collapse file tree 4 files changed +62
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ act 0.2.64
22gitleaks 8.18.4
33pre-commit 3.6.0
44terraform 1.9.2
5- vale 3.6.0
65tfsec 1.28.10
6+ vale 3.6.0
77
88# ==============================================================================
99# The section below is reserved for Docker image versions.
Original file line number Diff line number Diff line change @@ -22,3 +22,9 @@ paths = [
2222 ''' yarn.lock''' ,
2323 ''' Gemfile.lock''' ,
2424]
25+
26+ # Exclude Chrome version in user agent
27+ regexTarget = " line"
28+ regexes = [
29+ ''' Chrome/[\d.]+'''
30+ ]
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ repos:
1515 - id : pretty-format-json
1616 args : ['--autofix']
1717 # - id: ...
18+ - repo : local
19+ hooks :
20+ - id : sort-dictionary
21+ name : Sort dictionary
22+ entry : ./scripts/githooks/sort-dictionary.sh
23+ language : script
24+ pass_filenames : false
1825 - repo : local
1926 hooks :
2027 - id : scan-secrets
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ # Pre-commit git hook to sort the Vale dictionary in a consistent manner to avoid future merge conflicts and aid insertion of new terms
6+ #
7+ # Usage:
8+ # $ [options] ./sort-dictionary.sh
9+ #
10+ # Options:
11+ #
12+ #
13+ # Exit codes:
14+ # 0 - Successfully sorted the dictionary
15+ # non-zero - failed to sort dictionary
16+
17+ # ==============================================================================
18+
19+ function main() {
20+ root=scripts/config/vale/styles/config/vocabularies/words
21+ opts=" --dictionary-order --ignore-case -s"
22+ sort $opts $root /accept.txt > $root /accept.sorted.txt
23+ sort $opts $root /reject.txt > $root /reject.sorted.txt
24+
25+ mv $root /accept.sorted.txt $root /accept.txt
26+ mv $root /reject.sorted.txt $root /reject.txt
27+
28+ git add -uv $root /*
29+ }
30+
31+ # ==============================================================================
32+
33+ function is-arg-true() {
34+
35+ if [[ " $1 " =~ ^(true| yes| y| on| 1| TRUE| YES| Y| ON)$ ]]; then
36+ return 0
37+ else
38+ return 1
39+ fi
40+ }
41+
42+ # ==============================================================================
43+
44+ is-arg-true " ${VERBOSE:- false} " && set -x
45+
46+ main " $@ "
47+
48+ exit 0
You can’t perform that action at this time.
0 commit comments