Skip to content
Draft
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
33 changes: 33 additions & 0 deletions .github/workflows/vale-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Vale Linter Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
vale-quality-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Vale
run: |
wget https://github.com/errata-ai/vale/releases/download/v3.9.0/vale_3.9.0_Linux_64-bit.tar.gz
tar -xvzf vale_3.9.0_Linux_64-bit.tar.gz
sudo mv vale /usr/local/bin/

- name: Run Vale Smoke Test
run: |
cd docs-linter
vale sync
vale smoke-test.md --no-exit

- name: Install Markdownlint
run: sudo npm install -g markdownlint-cli

- name: Run Markdownlint (Format Check)
run: |
cd docs-linter
markdownlint --config .markdownlint.json smoke-test.md || true
Empty file.
8 changes: 8 additions & 0 deletions docs-linter/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": true,
"MD013": false,
"MD024": false,
"MD033": false,
"MD034": false,
"MD041": false
}
18 changes: 18 additions & 0 deletions docs-linter/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
StylesPath = styles
MinAlertLevel = suggestion
Vocab = terms
Packages = Microsoft

[*.{md,mdx}]
BasedOnStyles = Vale, Microsoft, custom-rules
TokenIgnores = (https?://[^\s\)]+)
BlockIgnores = (?s)(^---\n.*?\n---)

# Disable the noisy Microsoft rules
Microsoft.Accessibility = NO
Microsoft.Gender = NO
Microsoft.GenderBias = NO
Microsoft.Vocab = NO
Microsoft.Acronyms = NO
Microsoft.Foreign = NO
Microsoft.Avoid = NO
5 changes: 5 additions & 0 deletions docs-linter/sanity-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sanity Check

This file contains valid text.
I use GitHub and NetFoundry properly.
This ensures the linter configuration loads correctly.
16 changes: 16 additions & 0 deletions docs-linter/smoke-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Smoke Test File

This is a paragraph with trailing spaces at the end.
(That line has spaces, triggering MD009).

# A Second H1 Header (Violation: MD025)

#### Skipped Header Level (Violation: MD001 - H1 to H4)

Here is a list of Vale violations:

1. **Branding:** We use netfoundry and github in our daily work.
2. **Passive Voice:** The file was opened by the admin.
3. **Wordiness:** In order to login, you must utilize the key.
4. **First Person:** I decided to push the code myself.
5. **Spelling:** This is a testtoken for moret esting.
9 changes: 9 additions & 0 deletions docs-linter/styles/Microsoft/AMPM.yml
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 docs-linter/styles/Microsoft/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
64 changes: 64 additions & 0 deletions docs-linter/styles/Microsoft/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
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:
- API
- ASP
- CLI
- CPU
- CSS
- CSV
- DEBUG
- DOM
- DPI
- FAQ
- GCC
- GDB
- GET
- GPU
- GTK
- GUI
- HTML
- HTTP
- HTTPS
- IDE
- JAR
- JSON
- JSX
- LESS
- LLDB
- NET
- NOTE
- NVDA
- OSS
- PATH
- PDF
- PHP
- POST
- RAM
- REPL
- RSA
- SCM
- SCSS
- SDK
- SQL
- SSH
- SSL
- SVG
- TBD
- TCP
- TODO
- URI
- URL
- USB
- UTF
- XML
- XSS
- YAML
- ZIP
Loading