Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: spellingscontrole #59

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Check spelling'
on: # rebuild any PRs and main branch changes
pull_request:
push:

jobs:
spellcheck: # run the action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dictionaries
run: npm install @cspell/dict-nl-nl
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... Ik heb nu yarn gebruikt ... 🤔

Copy link
Member

@marcvanandel marcvanandel Sep 14, 2023

Choose a reason for hiding this comment

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

Sowieso zou dit npm ci moeten zijn ipv npm install ... maar nog beter yarn gebruiken met een lock file ... Mee eens, @nicorikken ?

See https://github.com/marketplace/actions/npm-or-yarn-install-with-caching

- uses: streetsidesoftware/cspell-action@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ Lokaal kan vervolgens de documentatie site gebouwd en getest worden met:
poetry run mkdocs serve
```

### Spellingscontrole

Dit project maakt gebruik van [CSpell](https://cspell.org/), een framework voor spellingscontrole dat goed rekening kan houden met code en andere gangbare platte-tekst formaten.
Het [nl-nl Dictionary](https://github.com/streetsidesoftware/cspell-dicts/tree/main/dictionaries/nl_NL) is gebaseerd op het eerdere werk in Hunspell.
Dit woordenboek is niet standaard aanwezig en moet expliciet geinstalleerd worden als je CSpell op je eigen computer wilt uitvoeren.
Spellingscontrole vindt ook online plaats door middel van een GitHub Action.

Lokaal installeren van CSpell en uitvoeren van de spellingscontrole:

```
npm install -g cspell@latest
marcvanandel marked this conversation as resolved.
Show resolved Hide resolved
npm install -g @cspell/dict-nl-nl
cspell link add @cspell/dict-nl-nl
cspell "**"
```

## Roadmap

Voor de [roadmap](https://github.com/orgs/ospo-nl/projects/1) gebruiken we GitHub Projects.
Expand All @@ -66,8 +82,8 @@ Dit project is opgezet als een open source project. Iedereen is welkom om bijdra
ook vrij en geeft ook vrijheid om afgeleide werken te maken. Wij zijn inclusief en maken geen onderscheid in etniciteit,
sekse of andere persoonlijke voorkeuren; bijdragen worden geacht zich daar aan te houden.

### Licentie
Dit project is gelicentieerd onder de **[Creative Commons Attribution 4.0 International
### Licentie
Dit project is gelicenseerd onder de **[Creative Commons Attribution 4.0 International
License](https://github.com/ospo-nl/.github/blob/main/LICENSE)**.

### Bijdragen
Expand Down
20 changes: 20 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json
version: "0.2"
language: en
import:
- "@cspell/dict-nl-nl/cspell-ext.json"
dictionaryDefinitions:
- name: ospo-nl-dict
path: "./ospo-nl-dict.txt"
addWords: true
dictionaries:
- ospo-nl-dict
- "nl-nl"
ignorePaths:
- "node_modules"
# Ignore GIMP files
- "**/*.xcf"
# Ignore License files that should not be touched
- "LICENSE"
- "LICENSES/*"
6 changes: 6 additions & 0 deletions ospo-nl-dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# custom words dictionary for cspell
OSPO
mkdocs
sourcen
maintainen
signoff
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "ospo-nl-kennisbank",
"version": "0.1.0",
"description": "Open Source Program Office NL kennisbank initiative",
"repository": "[email protected]:ospo-nl/kennisbank.git",
"author": "Marc van Andel <[email protected]>",
"license": "CC-BY-4.0",
"scripts": {
"cspell": "npx cspell '**/*.md'"
},
"devDependencies": {
"@cspell/dict-nl-nl": "^2.2.8",
"cspell": "^6.31.1"
}
}
Loading