forked from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into combineDependabotWorkflow
- Loading branch information
Showing
6 changed files
with
78 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
...config/vale/styles/Vocab/words/accept.txt → ...yles/config/vocabularies/words/accept.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
[A-Z]+s | ||
Bitwarden | ||
bot | ||
Cognito | ||
Cyber | ||
Dependabot | ||
draw.io | ||
drawio | ||
endcapture | ||
endfor | ||
endraw | ||
GitHub | ||
Gitleaks | ||
Grype | ||
idempotence | ||
Jira | ||
OAuth | ||
Octokit | ||
onboarding | ||
Podman | ||
Python | ||
rawContent | ||
sed | ||
Syft | ||
Terraform | ||
Trufflehog | ||
bot | ||
idempotence | ||
onboarding | ||
sed | ||
toolchain | ||
[A-Z]+s | ||
GitHub | ||
endraw | ||
draw.io | ||
endfor | ||
drawio | ||
rawContent | ||
endcapture | ||
Cognito | ||
Jira | ||
Trufflehog |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Pre-commit git hook to sort the Vale dictionary in a consistent manner to avoid future merge conflicts and aid insertion of new terms | ||
# | ||
# Usage: | ||
# $ [options] ./sort-dictionary.sh | ||
# | ||
# Options: | ||
# | ||
# | ||
# Exit codes: | ||
# 0 - Successfully sorted the dictionary | ||
# non-zero - failed to sort dictionary | ||
|
||
# ============================================================================== | ||
|
||
function main() { | ||
root=scripts/config/vale/styles/config/vocabularies/words | ||
opts="--dictionary-order --ignore-case -s" | ||
sort $opts $root/accept.txt > $root/accept.sorted.txt | ||
sort $opts $root/reject.txt > $root/reject.sorted.txt | ||
|
||
mv $root/accept.sorted.txt $root/accept.txt | ||
mv $root/reject.sorted.txt $root/reject.txt | ||
|
||
git add -uv $root/* | ||
} | ||
|
||
# ============================================================================== | ||
|
||
function is-arg-true() { | ||
|
||
if [[ "$1" =~ ^(true|yes|y|on|1|TRUE|YES|Y|ON)$ ]]; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
# ============================================================================== | ||
|
||
is-arg-true "${VERBOSE:-false}" && set -x | ||
|
||
main "$@" | ||
|
||
exit 0 |