|
| 1 | +# Spell & Style Checking |
| 2 | + |
| 3 | +To check both the spelling and the style of writing, we are using vale. |
| 4 | + |
| 5 | +These checks are performed using the [isc-styles][] definitions that are maintained centrally, so that they can be applied to all projects of the InnerSource Commons. |
| 6 | + |
| 7 | +Note that we have only started using vale recently (May 2023), and have only used it for the Patterns and the Learning Path so far. So some bumps in the road should be expected. |
| 8 | + |
| 9 | +Further note that we are not sure yet which documentation is best to keep here versus keeping it centrally in the [isc-styles][]. So we might consolidate this documentation at a later point. |
| 10 | + |
| 11 | +## How to check **Learning Path** content using vale (locally) |
| 12 | + |
| 13 | +To run the vale checks locally, you need to install: |
| 14 | + |
| 15 | +* [vale](https://vale.sh/docs/vale-cli/installation/) |
| 16 | +* asciidoctor - `gem install asciidoctor` |
| 17 | + |
| 18 | +Then synchronize your vale packages (i.e. download the [isc-styles][]) |
| 19 | + |
| 20 | +`$ vale sync` |
| 21 | + |
| 22 | +Then run vale on the files that you want to check, e.g.: |
| 23 | + |
| 24 | +`$ vale project-leader` |
| 25 | + |
| 26 | +This will run the checks on all markdown and asciidoc files below the `/project-leader` folder. |
| 27 | + |
| 28 | +Any issues found will be shown in the terminal and would look like this: |
| 29 | + |
| 30 | +```bash |
| 31 | + project-leader/outline.md |
| 32 | + 3:42 error Did you really mean ISC.Spelling |
| 33 | + 'intersting'? |
| 34 | + 3:211 error Did you really mean ISC.Spelling |
| 35 | + 'organisation'? |
| 36 | + 5:154 error Did you really mean ISC.Spelling |
| 37 | + 'consollidating'? |
| 38 | +``` |
| 39 | + |
| 40 | +## How to check new Learnign Path content coming in via Pull Requests |
| 41 | + |
| 42 | +This happens automatically, using GitHub Actions and this workflow [vale.yml](.github/workflows/vale.yml). |
| 43 | + |
| 44 | +Output looks like this: |
| 45 | + |
| 46 | +TBD |
| 47 | + |
| 48 | +You should only have to adapt that workflow when adding entirely new sections to the Learning Path. |
| 49 | + |
| 50 | +## How to add exceptions to the spell checker? |
| 51 | + |
| 52 | +There may be times where the Learning Path wants to use spelling differently from what is defined in [isc-styles][]. (Note that we hope that this will be the exception, as otherwise it won't make sense to maintain the styles centrally). |
| 53 | + |
| 54 | +To do so, add the exceptions that you want to make to [accept.txt](.github/vale/Vocab/Base/accept.txt) or [reject.txt](.github/vale/Vocab/Base/reject.txt) |
| 55 | + |
| 56 | +TBD - I think this needs to be described in more detail |
| 57 | + |
| 58 | +[isc-styles]: https://github.com/InnerSourceCommons/isc-styles |
0 commit comments