Skip to content

Commit

Permalink
ci: Add spell checker quality check job
Browse files Browse the repository at this point in the history
`cspell` is used as the spell checker tool to follow
Public GitHub repository spell check process.

Signed-off-by: Ahmed Ismail <[email protected]>
  • Loading branch information
AhmedIsmail02 committed Apr 25, 2024
1 parent d1d901f commit b738090
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions release_changes/202404251016.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: Add spell checker quality check job.
26 changes: 26 additions & 0 deletions tools/ci/pipeline-baseline-fri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,29 @@ tpip-check:
--private-token "${AUTOBOT_GITLAB_TOKEN}"
--project-id "${CI_PROJECT_ID}"
--merge-req-id "${CI_MERGE_REQUEST_IID}"
########################
# Spell Checker Job #
########################
spell-check:
tags:
- iotmsw-amd64
stage: quality-check
rules:
- if: $CI_MERGE_REQUEST_ID
script:
# Install the Dependencies we need to run the spell-checker
- apt-get update -y
- |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
- nvm install node
- apt-get install fd-find -y
- npm install -g cspell
# Find files with `.c`, `.h`, `.md`, `.txt`, `.change`, and `.yml` extensions in one patch.
# Then, run `cspell` on the collected files using `cspell.config.yaml` configuration file.
- |
fdfind -e c -e h -e md -e txt -e change -e yml --exec-batch \
cspell lint --language-id C --color --show-context --show-suggestions --no-must-find-files -c cspell.config.yaml

0 comments on commit b738090

Please sign in to comment.