Adding in link and spell checker#27
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
.github/actions/spelling/expect.txt
Outdated
| @@ -0,0 +1,12 @@ | |||
| apiVersion | |||
Check failure
Code scanning / check-spelling
Forbidden Pattern Error
.github/actions/spelling/expect.txt
Outdated
| @@ -0,0 +1,12 @@ | |||
| apiVersion | |||
Check failure
Code scanning / check-spelling
Check File Path Error
| @@ -0,0 +1,38 @@ | |||
| name: Link Checker | |||
Check failure
Code scanning / check-spelling
Check File Path Error
| @@ -0,0 +1,38 @@ | |||
| name: Link Checker | |||
Check failure
Code scanning / check-spelling
Check File Path Error
| - master | ||
|
|
||
| jobs: | ||
| linkcheck: |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
.github/workflows/link-checker.yaml
Outdated
| '**/*.yml' | ||
| fail: true | ||
| env: | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| @@ -0,0 +1,33 @@ | |||
| name: Check Spelling | |||
Check failure
Code scanning / check-spelling
Check File Path Error
| @@ -0,0 +1,33 @@ | |||
| name: Check Spelling | |||
Check failure
Code scanning / check-spelling
Check File Path Error
| - master | ||
|
|
||
| jobs: | ||
| spellcheck: |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
.github/actions/spelling/expect.txt
Outdated
| @@ -0,0 +1,12 @@ | |||
| apiVersion | |||
Check warning
Code scanning / check-spelling
Noisy File Warning
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.Unrecognized words (3)njk Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionaryThis includes both expected items (192) from .github/actions/spelling/expect.txt and unrecognized words (3)
Consider adding them (in cspell:filetypes/filetypes.txtTo stop checking additional dictionaries, add (in check_extra_dictionaries: ''Warnings (3)See the 📂 files view, the 📜action log, or 📝 job summary for details.
See |
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Link Checker | ||
| uses: lycheeverse/lychee-action@v1 |
There was a problem hiding this comment.
No objections to using a third party action for this if it's kept updated and secure which this seems to be. Can you do a bit of a comparison against https://github.com/hmcts/ops-runbooks/blob/main/Rakefile to see if this is better/quicker than what we have elsewhere? It would be good to keep this consistent across repos but it's not a must have.
There was a problem hiding this comment.
Yeah will do, main reason for not implementing it the ops-runbooks way in this repo as it requires Ruby, Bundler, Middleman setup. Which was already present in the ops golden path repo, but was not in this one. Also I would say after implementing both that this action is simpler to setup and use as a link checker. Mostly as it does not need as much setup effort and less maintenance overhead (Gemfile dependencies).
There was a problem hiding this comment.
Worth a quick mention on the show and tell maybe
Jira link
See DTSPO-29573
Change description
Added automated spell checking and link checking to the Golden Path Node.js documentation repository:
Spell Checker: Implemented using
check-spellingactionCreated
.github/actions/spelling/directory with configuration files (expect.txt, patterns.txt, excludes.txt, allow.txt, advice.md)Configured to only check changed files in PRs to reduce noise
Added custom dictionary for HMCTS-specific terms
Link Checker: Implemented using
lycheelink checkerCreated
.lycheerc.tomlconfiguration fileConfigured to authenticate with private GitHub repositories using GH_TOKEN
Both workflows run on pull requests and pushes to main/master branches to catch issues early.
Testing done
Security Vulnerability Assessment
CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?
Checklist