Skip to content

Commit

Permalink
ci(PRE-COMMIT): update vale config
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Mar 7, 2024
1 parent ccc5b21 commit 2736fa8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/scripts/job-50-test-precommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set -eo pipefail

main() {
pushd "${TEST_PROJECT_NAME}" >> /dev/null
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
scenario "${1}"
popd >> /dev/null
}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/workflow-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
COMMAND: |
CICD_COMMIT_MESSAGES_FILE="$(mktemp XXXXXXXX.git_history_file)"
git log --pretty=format:%s "${PUSHED_COMMIT_REV_RANGE}" > "${CICD_COMMIT_MESSAGES_FILE}"
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
poetry run pre-commit run --hook-stage commit-msg spelling-commit-message --commit-msg-filename "${CICD_COMMIT_MESSAGES_FILE}"
COMMAND_NAME: "Commit Message Spelling"
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
Expand Down Expand Up @@ -118,6 +119,7 @@ jobs:
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRE_HOOK_COMMAND: poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
PRECOMMIT_HOOK_ID: "spelling-markdown"
PRECOMMIT_HOOK_NAME: "Markdown Spelling"
PYTHON_VERSIONS: ${{ toJSON(fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_python_versions) }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ poetry.lock
.cicd-tools/boxes/*
!.cicd-tools/boxes/bootstrap
.cicd-tools/manifest.json
.vale
!.vale/Vocab
11 changes: 10 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
StylesPath = ".vale"
Vocab = "pre-commit"
MinAlertLevel = suggestion

Packages = proselint, alex, \
https://github.com/cicd-tools-org/vale/raw/main/bundles/0.1.0/cicd-tools.zip

[*]
BasedOnStyles = Vale
cicd-tools.GeneralProject = YES
Vale.Terms = NO
Vale.Spelling = NO

[*.md]
BasedOnStyles = Vale
BasedOnStyles = alex, proselint, Vale
alex.ProfanityUnlikely = NO
cicd-tools.GeneralProject = YES
Vale.Terms = YES
Vale.Spelling = NO
15 changes: 1 addition & 14 deletions .vale/Vocab/pre-commit/accept.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
(A|a)nsible
commitizen
(D|d)ev
dockerfile
Exe
actionlint
args
formatters
makefile
shellcheck
shfmt
tmp
tomll
trufflehog

0 comments on commit 2736fa8

Please sign in to comment.