Skip to content

Adding in link and spell checker#27

Merged
Kamil-Biegaj-HM merged 8 commits intomasterfrom
GoldenPath-NodeJs-Improvements
Jan 21, 2026
Merged

Adding in link and spell checker#27
Kamil-Biegaj-HM merged 8 commits intomasterfrom
GoldenPath-NodeJs-Improvements

Conversation

@Kamil-Biegaj-HM
Copy link
Copy Markdown
Contributor

@Kamil-Biegaj-HM Kamil-Biegaj-HM commented Jan 21, 2026

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-spelling action

  • Created .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 lychee link checker

  • Created .lycheerc.toml configuration file

  • Configured 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

  • Created PR and verified both spell checker and link checker workflows execute successfully
  • Tested spell checker with technical terms and verified custom dictionary is properly loaded
  • Tested link checker authentication with private HMCTS repositories
  • Verified exclusion patterns work correctly for both checkers

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?

  • Yes
  • [ X] No

Checklist

  • [X ] commit messages are meaningful and follow good commit message guidelines
  • [ X] README and other documentation has been updated / added (if needed)
  • [ X] tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

@github-advanced-security
Copy link
Copy Markdown

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.

@@ -0,0 +1,12 @@
apiVersion

Check failure

Code scanning / check-spelling

Forbidden Pattern Error

apiVersion matches a line_forbidden.patterns entry: "(?:[a-z]|(?!'ed$)'){3,}(?:(?:[A-Z]|(?!'ed$)'){3,}|[A-Z](?:[a-z]|(?!'ed$)'){2,})". (forbidden-pattern)
@@ -0,0 +1,12 @@
apiVersion

Check failure

Code scanning / check-spelling

Check File Path Error

github is not a recognized word. (check-file-path)
@@ -0,0 +1,38 @@
name: Link Checker

Check failure

Code scanning / check-spelling

Check File Path Error

github is not a recognized word. (check-file-path)
@@ -0,0 +1,38 @@
name: Link Checker

Check failure

Code scanning / check-spelling

Check File Path Error

workflows is not a recognized word. (check-file-path)
- master

jobs:
linkcheck:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

linkcheck is not a recognized word. (unrecognized-spelling)
'**/*.yml'
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

GITHUB is not a recognized word. (unrecognized-spelling)
@@ -0,0 +1,33 @@
name: Check Spelling

Check failure

Code scanning / check-spelling

Check File Path Error

github is not a recognized word. (check-file-path)
@@ -0,0 +1,33 @@
name: Check Spelling

Check failure

Code scanning / check-spelling

Check File Path Error

workflows is not a recognized word. (check-file-path)
- master

jobs:
spellcheck:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

spellcheck is not a recognized word. (unrecognized-spelling)
@@ -0,0 +1,12 @@
apiVersion

Check warning

Code scanning / check-spelling

Noisy File Warning

Skipping .github/actions/spelling/expect.txt because it seems to have more noise (7) than unique words (6) (total: 7 / 6). (noisy-file)
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (3)

njk
xxxxxxx
xxxxxxxxxxxxxx

Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (192) from .github/actions/spelling/expect.txt and unrecognized words (3)

Dictionary Entries Covers Uniquely
cspell:filetypes/filetypes.txt 264 1 1

Consider adding them (in .github/workflows/spell-checker.yaml) in jobs:/spellcheck: for uses: check-spelling/check-spelling@v0.0.24 in its with to extra_dictionaries:

          cspell:filetypes/filetypes.txt

To stop checking additional dictionaries, add (in .github/workflows/spell-checker.yaml) for uses: check-spelling/check-spelling@v0.0.24 in its with:

check_extra_dictionaries: ''
Warnings (3)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

⚠️ Warnings Count
⚠️ no-newline-at-eof 1
⚠️ noisy-file 1
⚠️ non-alpha-in-dictionary 1

See ⚠️ Event descriptions for more information.

@Kamil-Biegaj-HM Kamil-Biegaj-HM requested review from a team, dawidstrozak, endakelly, gunnertwin, ieuanb74, manohar-hmcts and ryanmcalary11 and removed request for a team January 21, 2026 11:09
uses: actions/checkout@v4

- name: Link Checker
uses: lycheeverse/lychee-action@v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a quick mention on the show and tell maybe

@Kamil-Biegaj-HM Kamil-Biegaj-HM merged commit d0e5c8c into master Jan 21, 2026
2 checks passed
@Kamil-Biegaj-HM Kamil-Biegaj-HM deleted the GoldenPath-NodeJs-Improvements branch January 21, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants