Skip to content

Commit

Permalink
Add basic Vale instructions and terms (#2)
Browse files Browse the repository at this point in the history
* Add Vale external styles to gitignore

* Add Vale instructions

* Add entries to vocabulary and test file
  • Loading branch information
nvitucci authored Sep 8, 2023
1 parent d2c66f1 commit aa0beb0
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@ dist

# Antora
build/

# Exclude external styles
vale/styles
!vale/styles/Neo4j
!vale/styles/Vocab
!vale/styles/Experimental
37 changes: 37 additions & 0 deletions vale/README.adoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# Vale

## Prerequisites

1. Install Vale according to the instructions on the link:https://vale.sh/docs/vale-cli/installation/[website].
2. Make sure Vale is installed correctly by running `vale` in the command line.
3. (Optional) Install the Vale plugin in VSCode.
## Run Vale

The basic way to run Vale is the following:

```
vale --config /path/to/vale/.vale.ini /path/to/doc/repo/modules/ROOT/pages/index.adoc
```

Here `/path/to/vale/` is the path to this repository, where the `.vale.ini` file can be found.
The `/path/to/doc/repo/` instead is the path to the repository containing the docs you want to run Vale on.

For example, run Vale with the included `.ini` file and the test Asciidoc file:

```
vale --config vale/.vale.ini vale/test.adoc
```

## Add a style

To add a new style (for example the Google style guide) in the Vale configuration, do the following:

1. Edit the `vale.ini` file to either add `Google` to the `BasedOnStyles` (to add all the style rules by default, and optionally disable some), or add single rules such as `Google.DateFormat = YES`.
2. Run `vale --config vale/.vale.ini sync` to download the new style (if it has not been downloaded before).
NOTE: Any styles added to the `vale/styles` directory except our custom ones are ignored by `git`.

## Add terms to the vocabulary

You can add terms with their accepted spelling in the `accept.txt` file(s) within the `vale/Vocab` subdirectories.

NOTE: Do not add entries where an entry fully contains another one, such as `Neo4j` and `Neo4j Aura`. Use the `Neo4j/Names.yml` rule for single words instead.
1 change: 1 addition & 0 deletions vale/styles/Neo4j/Names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ message: Use '%s' instead of '%s'.
level: error
swap:
- neo4j: Neo4j
- cypher: Cypher
11 changes: 10 additions & 1 deletion vale/styles/Vocab/Neo4j/accept.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Cypher
Apache Arrow
AuraDB Enterprise
AuraDB Free
AuraDB Professional
AuraDS Enterprise
AuraDS Professional
Neo4j Aura
Neo4j AuraDB
Neo4j AuraDS
Neo4j Bloom
Neo4j Browser
Neo4j Cypher Shell
Neo4j Desktop
Neo4j Server
Spring Boot
7 changes: 7 additions & 0 deletions vale/test.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Use the Neo4j browser.
Use the browser.
Use neo4j.
Open Neo4j AuraDb.
Use AuraDB enterprise.
Use Neo4j AuraDb enterprise.
Read the cypher cheatsheet.

0 comments on commit aa0beb0

Please sign in to comment.