nhs-england-tools / repository-template

🛠️ 📚💡 This is a detailed and carefully made template for your GitHub projects. It's based on the wide knowledge and practical experience of the engineering community within NHS England. The template includes helpful suggestions, standards and practices - it's something you should consider using for all your repositories.
MIT License
22 stars 9 forks source link

Vale issues 'config/vocabularies/words' directory does not exist #168

Closed aidenvaines-bjss closed 1 month ago

aidenvaines-bjss commented 2 months ago

Is there an existing issue for this?

Current Behavior

When CI runs '.github/actions/check-english-usage/action.yaml' action, the command check=all ./scripts/githooks/check-english-usage.sh fails with this error:

E100 [vocab] Runtime error

'config/vocabularies/words' directory does not exist

Expected Behavior

Actual output should look like this:

❯ check=branch ./scripts/githooks/check-english-usage.sh

 docs/pages/terraform-csis/index.md
 19:321  error  Did you really mean             Vale.Spelling 
                'longword'?                                
 21:26   error  Did you really mean 'xyz'?    Vale.Spelling 
 34:60   error  Did you really mean 'abc'?   Vale.Spelling 

✖ 3 errors, 0 warnings and 0 suggestions in 4 files.

Steps To Reproduce

make some spelling mistakes in repo. run check=branch ./scripts/githooks/check-english-usage.sh

Visible on this internal PR https://github.com/NHSDigital/nhs-notify-internal/actions/runs/9810021470/job/27089235437?pr=61 should you have access

Output

No response

Code of Conduct

Sensitive Information Declaration

aidenvaines-bjss commented 2 months ago

The latest vale container jdkato/vale is 3.6.0, the 2.29.7 pinned release is well over a year old

I had vale installed locally so the `scripts/githooks/check-english-usage.sh' script was picking that up over using the container.

According to the documentation:https://vale.sh/docs/topics/vocab/

In versions of Vale prior to 3.0, vocabularies were stored in /Vocab. When upgrading from an older version of Vale, you’ll need to move your vocabularies to the new /config/vocabularies location.

the .tool-versions file does contain this line # docker/jdkato/vale v2.29.7@sha256:5ccfac574231b006284513ac3e4e9f38833989d83f2a68db149932c09de85149 # SEE: https://hub.docker.com/r/jdkato/vale/tags

PR incoming to increase the version and fix the folder structures to be 3.0+ compliant