Skip to content

Commit d7cc791

Browse files
authored
Merge pull request #2 from InnerSourceCommons/custom-vocab-docs
Adding docs about adding custom vocab files
2 parents 8aa6ac9 + a9f21f6 commit d7cc791

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,31 @@ $ vale sync
3939
$ vale .
4040
```
4141

42+
## Using custom vocabulary files in combination with these styles
43+
44+
Create these files:
45+
`.github/vale/config/vocabularies/Base/{accept.txt, reject.txt}`
46+
47+
Add the words to these files that you want to accept/reject.
48+
49+
Extend `.vale.ini` like this:
50+
51+
```ini
52+
StylesPath = .github/vale
53+
MinAlertLevel = suggestion
54+
55+
Packages = https://github.com/InnerSourceCommons/isc-styles/releases/latest/download/ISC.zip
56+
57+
Vocab = Base
58+
59+
[*]
60+
BasedOnStyles = ISC
61+
```
62+
63+
For a working examples see [this repo](https://github.com/InnerSourceCommons/InnerSourceLearningPath/tree/main/.github/vale/config/vocabularies/Base).
64+
65+
Make sure to read how adding your Base vocabulary to git works (see section below).
66+
4267
## Adding vale assets to your project's .gitignore
4368

4469
As you are downloading these styles via `vale sync` to your local repository, you want to make sure that you don't commit them to your repository. Therefore add this entry to your `.gitignore`:
@@ -48,7 +73,9 @@ As you are downloading these styles via `vale sync` to your local repository, yo
4873
.github/vale/*
4974
```
5075

51-
If you want to add a custom Vocab for your repo (e.g. in `.github/vale/Vocab/Base`), we recommend to use `git add -f` to bypass the .gitignore entry. The vale documentation about [Packages and VCS](https://vale.sh/docs/topics/packages/#packages-and-vcs) does mention a way to add an exception to the `.gitignore` on a folder level, however we have not been able to get that to work.
76+
If you want to add a custom vocabulary for your repo (e.g. in `.github/vale/config/vocabularies/Base`), we recommend to use `git add -f` to bypass the `.gitignore` entry.
77+
78+
FYI: The vale documentation about [Packages and VCS](https://vale.sh/docs/topics/packages/#packages-and-vcs) does mention a way to add an exception to the `.gitignore` on a folder level, however we have not been able to get that to work.
5279

5380
## Using vale in a GitHub Action
5481

@@ -69,8 +96,8 @@ We use a custom dictionary for American English (provided by [Libre Office](http
6996

7097
However it can still happen that a word that you consider correct, is flagged by vale as incorrect. This happen especially when you are using domain-specific words like `hackathon` or similar that might be common in the software development domain but still not a proper word in the dicitonary sense :)
7198

72-
If in doubt, please check the spelling of a word against the [Meriam Webster](https://www.merriam-webster.com/) dictionary.
99+
If in doubt, please check the spelling of a word against the [Merriam Webster](https://www.merriam-webster.com/) dictionary.
73100

74101
## References
75102

76-
- We should try learn how others have used vale, and what of that we want to adopt for our purposes. For an example of another org see https://github.com/aiven/devportal/blob/main/.github/vale/README.rst
103+
- We should try to learn how others have used vale, and what of that we want to adopt for our purposes. For an example of another org see https://github.com/aiven/devportal/blob/main/.github/vale/README.rst

0 commit comments

Comments
 (0)