Skip to content

Commit

Permalink
fixes for vale
Browse files Browse the repository at this point in the history
  • Loading branch information
m4sterbunny authored and joshuafernandes committed Sep 26, 2024
1 parent 1acd6aa commit b6e657f
Show file tree
Hide file tree
Showing 11 changed files with 747 additions and 99 deletions.
6 changes: 5 additions & 1 deletion spelling/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@

StylesPath = ./styles

# The ignore config references project-words.txt

Spelling.Ignore = config/ignore/Consensys-common


# Packages to sync with. Remember never adapt the external packages, all changes will be lost on update

Packages = Microsoft, proselint, write-good
Expand All @@ -15,10 +18,11 @@ Vocab = Consensys-common

# The minimum alert level to display (suggestion, warning, or error).
# Builds not set to fail too many false positives
MinAlertLevel = suggestion
MinAlertLevel = warning

[formats]
mdx = md
yaml = yml

# Global settings (applied to every syntax)
[*.{md,yml}]
Expand Down
16 changes: 7 additions & 9 deletions spelling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,19 @@ be compiled to this one sot.

If API specs are managed as YAML files, need to test whether Vale can handle linting YAMLs.

## Testing Vale Here

This heading should trigger warning for non-compliance with sentence case. Metamask should upset
Vale too.

## ToDo

### Incorporate project-words.txt from repos
[x] Besu
[x] Teku

### Overrides

Attempted to overcome false positives with:

1. /styles/ignore which references the Consensys-common/ignore.txt text file (which should override Vale.Spelling)
2. With styles/Consensys/Overridesyaml which is a dummy extend of "existence" to allow use of an exceptions
list {I am not convinced this is working and its not a ssot method as it will need to repeat the ignore items
for Vale.Spelling}
1. /styles/ignore which references the Consensys-common/ignore.txt text file
2. With styles/Consensys/ProjectWords.yml which is a dummy extend of "existence" to allow use of an exceptions
list



Expand Down
6 changes: 5 additions & 1 deletion spelling/styles/Consensys/Acronyms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exceptions:
- CLI
- CORS
- CPU
- CSS
- CSV
- DEBUG
- ECDSA
Expand All @@ -26,6 +27,7 @@ exceptions:
- GET
- GPU
- gRPC
- GTag
- GUI
- HEX
- HTML
Expand All @@ -40,13 +42,14 @@ exceptions:
- JDK
- JRE
- JSON
- JSX
- JVM
- KMS
- P2P
- PATH
- PBFT
- PKCS
- POA
- PoA
- POS
- POST
- PostgreSQL
Expand All @@ -63,6 +66,7 @@ exceptions:
- SSL
- SVG
- TCP
- TKBU
- TLS
- TOC
- TOML
Expand Down
4 changes: 3 additions & 1 deletion spelling/styles/Consensys/CaseSensitive-Substitution.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends: substitution
message: For system-specific term, consider %s instead of "%s"
message: For component of a system or named entity, consider standard format, %s instead of "%s"
ignorecase: false
level: warn
action:
Expand All @@ -11,3 +11,5 @@ swap:
prover: Prover
# Linea Voyage
voyage: Voyage
besu: Besu
Dapp: dapp
24 changes: 0 additions & 24 deletions spelling/styles/Consensys/Overrides.yml

This file was deleted.

9 changes: 9 additions & 0 deletions spelling/styles/Consensys/Punctuation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: substitution
message: "Prefer Consensys style."
level: error
ignorecase: true
action:
name: replace
swap:
: "'"
: '"'
55 changes: 0 additions & 55 deletions spelling/styles/config/ignore/Consensys-common/ignore.txt

This file was deleted.

Loading

0 comments on commit b6e657f

Please sign in to comment.