Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/vale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Vale Documentation Linting

This directory contains configuration files for [Vale](https://vale.sh/docs), an open-source documentation linting tool.

## Setup

1. [Install Vale](https://vale.sh/docs/install):
- **Windows**: `choco install vale`
- **macOS**: `brew install vale`
- **Linux**: `snap install vale`

2. Run the linting:
- **Windows**: `.\scripts\check-docs.ps1`
- **Linux/macOS**: `./scripts/check-docs.sh`

## Configuration

- `.vale.ini`: Main configuration file (located in the repository root)
- `.github/vale/styles/`: Contains custom style rules
- `.github/vale/vocab/`: Contains project-specific vocabulary

## CI Integration

Vale automatically runs on pull requests that modify documentation files via the GitHub Actions workflow defined in `.github/workflows/vale-lint.yml`.

## Adding New Rules

To add new style rules:

1. Create a new YAML file in `.github/vale/styles/Vale/`.
2. Define the rule using Vale's [style syntax](https://vale.sh/docs/styles).
3. Test the rule locally.

## Project-Specific Vocabulary

Add project-specific terms to:
- `.github/vale/vocab/Base/accept.txt` for words that should be accepted
- `.github/vale/vocab/Base/reject.txt` for words that should be flagged
9 changes: 9 additions & 0 deletions .github/vale/styles/Nordic/AMPM.yml_ignored
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: Use 'AM' or 'PM' (preceded by a space).
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
level: error
nonword: true
tokens:
- '\d{1,2}[AP]M'
- '\d{1,2} ?[ap]m'
- '\d{1,2} ?[aApP]\.[mM]\.'
30 changes: 30 additions & 0 deletions .github/vale/styles/Nordic/Accessibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
extends: existence
message: "Don't use language (such as '%s') that defines people by their disability."
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms
level: suggestion
ignorecase: true
tokens:
- a victim of
- able-bodied
- an epileptic
- birth defect
- crippled
- differently abled
- disabled
- dumb
- handicapped
- handicaps
- healthy person
- hearing-impaired
- lame
- maimed
- mentally handicapped
- missing a limb
- mute
- non-verbal
- normal person
- sight-impaired
- slow learner
- stricken with
- suffers from
- vision-impaired
165 changes: 165 additions & 0 deletions .github/vale/styles/Nordic/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
extends: conditional
message: "'%s' has no definition."
link: https://docs.microsoft.com/en-us/style-guide/acronyms
level: suggestion
ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
# ... with the exception of these:
exceptions:
- ACME
- ADAC
- AES
- AMP
- API
- APIs
- APB
- ARM
- ASP
- BICR
- CBOR
- CCM
- CDDL
- CLI
- CLK
- COEX
- COM
- CPU
- CPUs
- CSN
- CSS
- CTRL
- CSV
- DEBUG
- DFU
- DK
- DMA
- DOM
- DPI
- DTS
- DVFS
- ESB
- EXMIF
- FAQ
- FLPR
- GCC
- GDB
- GET
- GND
- GPIO
- GPU
- GRTC
- GTK
- GUI
- HCI
- HEX
- HFXO
- HOST
- HTML
- HSFLL
- HSFLLs
- HTTP
- HTTPS
- ICMsg
- ICBMsg
- ID
- IDE
- IEEE
- IETF
- IPC
- IRQ
- ISR
- JAR
- JSON
- JSX
- LCS
- LESS
- LFCLK
- LFXO
- LLDB
- MAC
- MCU
- MIPI
- MPC
- MPI
- MRAM
- NCS
- NET
- NFC
- NOTE
- NSC
- NVDA
- NVM
- OEM
- OSS
- PATH
- PCA
- PCB
- PDF
- PHP
- POST
- PPR
- PRO
- PSA
- PUF
- RAM
- RAW
- REPL
- RESET
- RFC
- RISC
- RMA
- RoT
- ROM
- RSA
- RTOS
- SAADC
- SCFW
- SCM
- SCSS
- SDFW
- SDK
- SDRFW
- SDROM
- SMP
- SoC
- SPI
- SPIS
- SPU
- SQL
- SSF
- SSH
- SSL
- SUIT
- SVG
- SVD
- SWD
- SWJ
- SYSCTRL
- TCP
- TTP
- UART
- UARTE
- UARTE120
- UICR
- URI
- URIs
- URL
- USB
- USBHS
- UTF
- UUID
- VBUS
- VCOM
- VDD
- VDDH
- VEVIF
- VID
- VPR
- VPRs
- VSC
- XML
- XSS
- YAML
- ZIP
Loading