Skip to content

Commit

Permalink
ci: add cspell check
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Perruzza <[email protected]>
  • Loading branch information
EthanPERRUZZA committed Jan 30, 2025
1 parent f3261f4 commit 7be66fa
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
commit_titles | TERM=xterm-color .github/scripts/check-commit-titles.sh
- name: Spell check
run: |
npm install --include=dev
npm run spellcheck
check_reuse_compliance:
runs-on: ubuntu-latest
steps:
Expand Down
31 changes: 31 additions & 0 deletions cspell/acronyms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ABAC
BAPR
BMCV
BMVU
CAPI
COVIT
Cruda
DAAT
DGEX
EPSF
EPSG
ERTMS
ETCS
ETML
FLOI
FRMCS
GPRS
IPCS
IPCS
ITCS
MARECO
MRSP
OSRD
QGIS
STDCM
TECS
TSCS
TVDS
VUSS
VUTP
VUTR
69 changes: 69 additions & 0 deletions cspell/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"version": "0.2",
"language": "en",
"files": [
"**/*.en.md",
"**/*.fr.md",
"*.md",
],
"import": [
"@cspell/dict-rust/cspell-ext.json",
"@cspell/dict-sql/cspell-ext.json",
"@cspell/dict-fr-fr/cspell-ext.json",
],
"dictionaries": [
"acronyms",
"names",
"project-words",
"rust",
"softwareTerms",
"sql",
"unwanted-words",
],
"overrides": [
{
"filename": "**/*.en.md",
"dictionaries": [
"en_US",
"en-gb",
]
},
{
"filename": "*.md",
"dictionaries": [
"en_US",
"en-gb",
]
},
{
"filename": "**/*.fr.md",
"dictionaries": [
"fr-fr",
]
},
],
"allowCompoundWords": false,
"caseSensitive": false,
"dictionaryDefinitions": [
{
"name": "acronyms",
"path": "./acronyms.txt",
"addWords": true
},
{
"name": "names",
"path": "./names.txt",
"addWords": true
},
{
"name": "project-words",
"path": "./project-words.txt",
"addWords": true
},
{
"name": "unwanted-words",
"path": "./unwanted-words.txt",
"addWords": true
},
],
}
15 changes: 15 additions & 0 deletions cspell/names.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Bellebia
Breit
Céline
Dessagne
Djamal
Durupt
Klara
Kutta
Loïc
Marchal
Mémin
Ménin
Morgane
Runge
Senejko
74 changes: 74 additions & 0 deletions cspell/project-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
allkeys
autonumber
autosquash
balise # In English, the French word is used https://en.wiktionary.org/wiki/balise
Bundesbahnen
choo
clignotant
CODEOWNERS
creds
devroom
dreiländer
editoast
eurobalise
eurobalises
eurocab
euroloop
euroradio
exploitability
fosdem
hashées
interprétabilité
isort
linté
macbooks
maxmemory
mgsin
modelv
möglich
motis
mtlynch
networker
netzgrafik
odométriques
odometry
Odoo
opendata
openrail
osrdyne
österreichische
osxkeychain
parallelizable
pathfinding
plpgsql
privlvl
privs
pytest
pytype
rabbitmq
railjson
ralen
redistribuable
refacto
relref
remarquable # We use it in English to explain what the PR acronym is in OSRD
réplicas
rustc
schweizerische
scopé
scoper
sémaphore
stringifying
tchou
Tdriver
Tindication
topo
tractionner
Transifex
Twarning
typesystem
unsignaled
Valkey
VecDeque
virtiofs
xchg
6 changes: 6 additions & 0 deletions cspell/unwanted-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
autoplay
dont
imagepostlinkedin
marginauto
opensource
pageinfo
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
"build": "hugo --gc --cleanDestinationDir --minify",
"build:preview": "hugo --buildDrafts --buildFuture",
"start": "hugo server",
"spellcheck": "cspell -c cspell/cspell.json",
"test": "echo \"Error: no test specified\" && exit 1",
"clean": "clean-install"
},
"devDependencies": {
"@cspell/dict-fr-fr": "^2.2.5",
"@cspell/dict-rust": "^4.0.11",
"@cspell/dict-sql": "^2.2.0",
"autoprefixer": "^10.4.17",
"cspell": "^8.17.2",
"hugo-bin-extended": "^0.121.2",
"postcss": "^8.4.33",
"postcss-cli": "^11.0.0"
Expand Down

0 comments on commit 7be66fa

Please sign in to comment.