Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
67b3dc9
add vale-linter skeleton
nicoalba Dec 16, 2025
b0dfb4c
remove damn zone identifiers
nicoalba Dec 16, 2025
193f087
add new lines
nicoalba Dec 16, 2025
85b95b4
EOD
nicoalba Dec 23, 2025
feaf414
add mdx extension and microsoft package
nicoalba Dec 23, 2025
60c2e4f
adjust rules
nicoalba Dec 23, 2025
654f4bb
rule updates
nicoalba Dec 23, 2025
8aeb30c
vale working now
nicoalba Dec 23, 2025
8414c87
test pipelines cvale
nicoalba Dec 23, 2025
b57af5e
Add Vale CI workflow
nicoalba Dec 23, 2025
285d7f6
fix config to show develop
nicoalba Dec 23, 2025
ff8223e
Force CI trigger
nicoalba Dec 23, 2025
308c92f
Fix CI to target main branch
nicoalba Dec 23, 2025
7745e03
add no fail line for buiild
nicoalba Dec 23, 2025
b0780ed
add markdownlint step to container
nicoalba Dec 23, 2025
c650e93
new test
nicoalba Dec 23, 2025
371546a
remove tests
nicoalba Dec 23, 2025
0c61eac
EOD
nicoalba Dec 23, 2025
7e3bc19
Disable Microsoft.Vocab rule in Vale configuration
nicoalba Dec 24, 2025
f87fbea
Update .vale.ini
nicoalba Dec 24, 2025
deccf3b
Update .vale.ini
nicoalba Dec 24, 2025
b8025d8
Add TokenIgnores back to .vale.ini
nicoalba Dec 24, 2025
eb44f57
Disable SentenceLength and Adverbs checks in Vale
nicoalba Dec 26, 2025
d80bb8b
Add new terms to accept.txt vocabulary list
nicoalba Dec 26, 2025
b099098
Delete docs-linter/sanity-check.md
nicoalba Dec 26, 2025
b15d614
Update accept.txt
nicoalba Dec 26, 2025
36a8d5a
Add exclusions for technical writing in .vale.ini
nicoalba Dec 26, 2025
65858ab
Add terms 'plaintext', 'ciphertext', 'Keycloak', and 'IdP'
nicoalba Dec 26, 2025
33d2d57
updates
nicoalba Dec 26, 2025
6be32a6
updates to tokens
nicoalba Dec 26, 2025
b527908
remove unwanted microsoft files
nicoalba Dec 26, 2025
513b575
remove duplicate vale-check
nicoalba Dec 29, 2025
16462ed
remove disable section since i deleted the rules themselves
nicoalba Dec 29, 2025
82f5dc1
update build-docs and vale-check with new logic
nicoalba Dec 29, 2025
4733949
update vale-check with proper path
nicoalba Dec 29, 2025
cd0080d
and env block to step 3 vale check
nicoalba Dec 29, 2025
4a3a449
fixes
nicoalba Dec 29, 2025
bcee4b4
testing
nicoalba Dec 29, 2025
537297a
fixes
nicoalba Dec 29, 2025
411b6a3
update email
nicoalba Dec 29, 2025
df2baa4
Last attempt of the day
nicoalba Dec 29, 2025
bef72f8
simplify linter
nicoalba Jan 7, 2026
9b3e75f
fix path
nicoalba Jan 7, 2026
2108f41
update so it doesnt fail build on vale errors
nicoalba Jan 7, 2026
97e7b78
fix build so it only lints md/mdx
nicoalba Jan 7, 2026
e681fbb
updated build-doc.sh
nicoalba Jan 7, 2026
87c8ed9
update rules
nicoalba Jan 8, 2026
b4e70fc
fix vale hiearchy
nicoalba Jan 8, 2026
68b4571
eod edits
nicoalba Jan 8, 2026
c7ff531
add lint script
nicoalba Jan 9, 2026
58e7331
updates
nicoalba Jan 9, 2026
d0be8e9
Update .vale.ini
nicoalba Jan 9, 2026
bdeb87f
Disable heading punctuation check in Vale
nicoalba Jan 9, 2026
390a09b
Update accept.txt
nicoalba Jan 9, 2026
8768790
Remove config-related terms from accept.txt
nicoalba Jan 9, 2026
039ee71
Update TokenIgnores in .vale.ini
nicoalba Jan 9, 2026
338c650
Add 'config' and 'Config' to accept vocabulary
nicoalba Jan 9, 2026
fc45c9b
Fix regex for TokenIgnores pattern
nicoalba Jan 9, 2026
b4d27b6
Remove 'config' terms from vocabulary
nicoalba Jan 9, 2026
e3ba687
fixing false positives
nicoalba Jan 9, 2026
78627ce
Update .vale.ini
nicoalba Jan 9, 2026
03c437e
Update lint.sh
nicoalba Jan 9, 2026
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
26 changes: 26 additions & 0 deletions .github/workflows/vale-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint Docs

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# 1. Install Tools (Same as Bitbucket/Local)
- name: Install Tools
run: |
# Install Vale
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/
# Install Markdownlint
npm install -g markdownlint-cli
# 2. Run your Custom Script
- name: Run Quality Check
run: |
chmod +x docs-linter/lint.sh
# Run lint.sh targeting the current directory "."
./docs-linter/lint.sh .
12 changes: 12 additions & 0 deletions docs-linter/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"default": true,
"MD013": false, // Line length. Docs often require long lines for links/commands.
"MD024": false, // Multiple headings with the same content. Useful for recurring sections like "Parameters".
"MD033": false, // Inline HTML. Essential for Docusaurus features (tabs, admonitions, specialized formatting).
"MD034": false, // Bare URLs (e.g. https://example.com) without <brackets>. Common in quickstart guides.
"MD040": false, // Fenced code blocks must have a language (e.g., ```bash). Good practice, but currently causing errors.
"MD041": false, // First line in file must be a top-level heading (H1). Docusaurus uses frontmatter (---) first.
"MD047": false, // Files must end with a single newline character. Pedantic and invisible.
"MD009": false, // Trailing spaces. Flags every invisible space at the end of a line. Huge noise source.
"MD060": false // Table column style. Flags tables that aren't perfectly ASCII-aligned in the raw text file. Purely visual.
}
21 changes: 21 additions & 0 deletions docs-linter/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# --- CORE SETTINGS ---
StylesPath = styles
MinAlertLevel = suggestion
Vocab = terms
Packages = Microsoft, Google, Readability, alex, proselint

# --- GLOBAL IGNORES ---
IgnoredScopes = code, tt, script, style, pre, figure, strong, b, link.url, a.href

# --- FILE SPECIFIC SETTINGS ---
[*.{md,mdx}]
# Put custom-rules AFTER Microsoft so it overrides
BasedOnStyles = Microsoft, custom-rules
Vale.Terms = NO
Microsoft.Terms = NO
Microsoft.ComplexWords = NO

# --- RULE CONFIGURATION ---
Microsoft.Contractions = NO
Microsoft.FirstPerson = NO
Microsoft.HeadingPunctuation = NO
126 changes: 126 additions & 0 deletions docs-linter/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#!/bin/bash

# --- 1. SETUP PATHS ---
# Determine where this script is located (inside docs-linter)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# The config files are now in the SAME directory as the script
CONFIG_DIR="$SCRIPT_DIR"

# The target to scan is the first argument, or current directory if empty
TARGET_DIR="${1:-.}"

# --- 2. VALIDATION ---
if [ ! -f "$CONFIG_DIR/.vale.ini" ]; then
echo "❌ Error: Could not find .vale.ini in $CONFIG_DIR"
exit 1
fi

if [ ! -d "$TARGET_DIR" ]; then
echo "❌ Error: Target directory '$TARGET_DIR' does not exist."
exit 1
fi

# --- 3. PREPARE TEMPORARY LOGS ---
LIST_FILE=$(mktemp)
VALE_LOG=$(mktemp)
MD_LOG=$(mktemp)
VALE_CLEAN=$(mktemp)
MD_CLEAN=$(mktemp)

# --- 4. GATHER FILES ---
echo "🎯 Gathering file list from '$TARGET_DIR'..."

# Find markdown files, ignoring node_modules, remotes, and versioned docs
find "$TARGET_DIR" -type f \( -name "*.md" -o -name "*.mdx" \) \
| grep -v "/node_modules/" \
| grep -v "/_remotes/" \
| grep -v "/versioned_docs/" \
> "$LIST_FILE"

FILE_COUNT=$(wc -l < "$LIST_FILE")
echo "📊 Found $FILE_COUNT files to scan..."

if [ "$FILE_COUNT" -eq 0 ]; then
echo "⚠️ No files found to scan."
rm "$LIST_FILE" "$VALE_LOG" "$MD_LOG"
exit 0
fi

# --- 5. RUN LINTERS ---

# Check if Vale is installed
if command -v vale &> /dev/null; then
echo "📝 Running Vale..."
tr '\n' '\0' < "$LIST_FILE" | xargs -0 -r timeout 5m vale \
--config "$CONFIG_DIR/.vale.ini" \
--no-wrap \
--no-exit \
> "$VALE_LOG" 2>&1
else
echo "⚠️ Vale is not installed. Skipping."
fi

# Check if Markdownlint is installed
if command -v markdownlint &> /dev/null; then
echo "🧹 Running Markdownlint..."
tr '\n' '\0' < "$LIST_FILE" | xargs -0 -r timeout 5m markdownlint \
--config "$CONFIG_DIR/.markdownlint.json" \
> "$MD_LOG" 2>&1 || true
else
echo "⚠️ Markdownlint is not installed. Skipping."
fi

# --- 6. FORMAT OUTPUT ---
# Strip absolute paths for readability
CWD=$(pwd)
sed "s|$CWD/||g" "$VALE_LOG" | sed 's/\x1b\[[0-9;]*m//g' > "$VALE_CLEAN"

sed "s|$CWD/||g" "$MD_LOG" | sed 's/\x1b\[[0-9;]*m//g' | \
awk -F: '
$1!=last { if(NR>1)print""; print $1; last=$1 }
{ $1=""; print " " substr($0,2) }
' > "$MD_CLEAN"

# --- 7. SUMMARY & REPORT ---
V_ERR=$(grep -c " error " "$VALE_CLEAN" || true)
V_WARN=$(grep -c " warning " "$VALE_CLEAN" || true)
V_SUG=$(grep -c " suggestion " "$VALE_CLEAN" || true)
MD_ERR=$(grep -c "^ " "$MD_CLEAN" || true)
TOTAL=$((V_ERR + V_WARN + V_SUG + MD_ERR))

echo ""
echo "========================================================"
echo "📊 LINT SUMMARY"
echo "========================================================"
echo " 📄 Files Scanned: $FILE_COUNT"
echo " 🛑 Vale Errors: $V_ERR"
echo " ⚠️ Vale Warnings: $V_WARN"
echo " 💡 Vale Suggestions: $V_SUG"
echo " 🧹 Markdownlint Issues: $MD_ERR"
echo "--------------------------------------------------------"
echo " 🚨 TOTAL ISSUES: $TOTAL"
echo "========================================================"
echo ""

if [ "$MD_ERR" -gt 0 ]; then
echo "########################################################"
echo " MARKDOWNLINT REPORT"
echo "########################################################"
cat "$MD_CLEAN"
echo ""
fi

if [ $((V_ERR + V_WARN + V_SUG)) -gt 0 ]; then
echo "########################################################"
echo " VALE REPORT"
echo "########################################################"
cat "$VALE_CLEAN"
echo ""
fi

# Cleanup
rm "$LIST_FILE" "$VALE_LOG" "$MD_LOG" "$VALE_CLEAN" "$MD_CLEAN"

# Optional: Exit with failure if errors found
# [ "$TOTAL" -gt 0 ] && exit 1 || exit 0
11 changes: 11 additions & 0 deletions docs-linter/styles/Microsoft/Auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: existence
message: "In general, don't hyphenate '%s'."
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/auto
ignorecase: true
level: error
action:
name: convert
params:
- simple
tokens:
- 'auto-\w+'
14 changes: 14 additions & 0 deletions docs-linter/styles/Microsoft/ComplexWords.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends: substitution
message: "Consider using '%s' instead of '%s'"
level: warning
ignorecase: true
# This rule swaps complex words for simpler ones (e.g. utilize -> use)
swap:
utilize: use
utilization: use
facilitate: help
leverage: use
commence: start
terminate: end
subsequently: later

50 changes: 50 additions & 0 deletions docs-linter/styles/Microsoft/Contractions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
extends: substitution
message: "Use '%s' instead of '%s'."
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-contractions
level: error
ignorecase: true
action:
name: replace
swap:
are not: aren't
cannot: can't
could not: couldn't
did not: didn't
do not: don't
does not: doesn't
has not: hasn't
have not: haven't
how is: how's
is not: isn't

'it is(?!\.)': it's
'it''s(?=\.)': it is

should not: shouldn't

"that is(?![.,])": that's
'that''s(?=\.)': that is

'they are(?!\.)': they're
'they''re(?=\.)': they are

was not: wasn't

'we are(?!\.)': we're
'we''re(?=\.)': we are

'we have(?!\.)': we've
'we''ve(?=\.)': we have

were not: weren't

'what is(?!\.)': what's
'what''s(?=\.)': what is

'when is(?!\.)': when's
'when''s(?=\.)': when is

'where is(?!\.)': where's
'where''s(?=\.)': where is

will not: won't
13 changes: 13 additions & 0 deletions docs-linter/styles/Microsoft/Dashes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends: existence
message: "Remove the spaces around '%s'."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/emes
ignorecase: true
nonword: true
level: error
action:
name: edit
params:
- trim
- " "
tokens:
- '\s[—–]\s|\s[—–]|[—–]\s'
8 changes: 8 additions & 0 deletions docs-linter/styles/Microsoft/DateFormat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: Use 'July 31, 2016' format, not '%s'.
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
ignorecase: true
level: error
nonword: true
tokens:
- '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}'
40 changes: 40 additions & 0 deletions docs-linter/styles/Microsoft/DateNumbers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
extends: existence
message: "Don't use ordinal numbers for dates."
link: https://docs.microsoft.com/en-us/style-guide/numbers#numbers-in-dates
level: error
nonword: true
ignorecase: true
raw:
- \b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?)\b\s*
tokens:
- first
- second
- third
- fourth
- fifth
- sixth
- seventh
- eighth
- ninth
- tenth
- eleventh
- twelfth
- thirteenth
- fourteenth
- fifteenth
- sixteenth
- seventeenth
- eighteenth
- nineteenth
- twentieth
- twenty-first
- twenty-second
- twenty-third
- twenty-fourth
- twenty-fifth
- twenty-sixth
- twenty-seventh
- twenty-eighth
- twenty-ninth
- thirtieth
- thirty-first
8 changes: 8 additions & 0 deletions docs-linter/styles/Microsoft/DateOrder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Always spell out the name of the month."
link: https://docs.microsoft.com/en-us/style-guide/numbers#numbers-in-dates
ignorecase: true
level: error
nonword: true
tokens:
- '\b\d{1,2}/\d{1,2}/(?:\d{4}|\d{2})\b'
9 changes: 9 additions & 0 deletions docs-linter/styles/Microsoft/Ellipses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: "In general, don't use an ellipsis."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/ellipses
nonword: true
level: warning
action:
name: remove
tokens:
- '\.\.\.'
16 changes: 16 additions & 0 deletions docs-linter/styles/Microsoft/FirstPerson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extends: existence
message: "Use first person (such as '%s') sparingly."
link: https://docs.microsoft.com/en-us/style-guide/grammar/person
ignorecase: true
level: warning
nonword: true
tokens:
- (?:^|\s)I(?=\s)
- (?:^|\s)I(?=,\s)
- \bI'd\b
- \bI'll\b
- \bI'm\b
- \bI've\b
- \bme\b
- \bmy\b
- \bmine\b
8 changes: 8 additions & 0 deletions docs-linter/styles/Microsoft/Gender.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Don't use '%s'."
link: https://github.com/MicrosoftDocs/microsoft-style-guide/blob/master/styleguide/grammar/nouns-pronouns.md#pronouns-and-gender
level: error
ignorecase: true
tokens:
- he/she
- s/he
8 changes: 8 additions & 0 deletions docs-linter/styles/Microsoft/HeadingColons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Capitalize '%s'."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/colons
nonword: true
level: error
scope: heading
tokens:
- ':\s[a-z]'
Loading