This commit is contained in:
parent
baae07dc3c
commit
cb205c88df
1 changed files with 18 additions and 29 deletions
47
.github/workflows/lint.yml
vendored
47
.github/workflows/lint.yml
vendored
|
|
@ -47,54 +47,43 @@ jobs:
|
||||||
# fail_on_error: true
|
# fail_on_error: true
|
||||||
# files: .
|
# files: .
|
||||||
|
|
||||||
- name: Install and run Vale
|
- name: Install and run Vale (direct)
|
||||||
run: |
|
run: |
|
||||||
# Install Vale (same binary the action uses)
|
# Install Vale (same binary the action uses)
|
||||||
wget -qO- https://github.com/errata-ai/vale/releases/download/v3.14.1/vale_3.14.1_Linux_64-bit.tar.gz | tar xz -C /tmp
|
wget -qO- https://github.com/errata-ai/vale/releases/download/v3.14.1/vale_3.14.1_Linux_64-bit.tar.gz | tar xz -C /tmp
|
||||||
export PATH="/tmp:$PATH"
|
export PATH="/tmp:$PATH"
|
||||||
|
|
||||||
# Ensure we are in the repository root
|
# sanity
|
||||||
echo "=== PWD ==="
|
echo "=== PWD ==="; pwd
|
||||||
pwd
|
|
||||||
|
|
||||||
# Show .vale.ini so we can confirm patterns / BasedOnStyles
|
# show config
|
||||||
echo ""
|
echo "=== .vale.ini ==="; sed -n '1,200p' .vale.ini || echo "No .vale.ini found"
|
||||||
echo "=== .vale.ini ==="
|
|
||||||
sed -n '1,200p' .vale.ini || echo "No .vale.ini found"
|
|
||||||
|
|
||||||
# Confirm markdown files exist
|
# list markdown files
|
||||||
echo ""
|
echo "=== Markdown files (first 100) ==="
|
||||||
echo "=== Markdown files (first 50) ==="
|
find content -name '*.md' -print | sed -n '1,100p' || true
|
||||||
find content -name '*.md' -print | sed -n '1,50p' || true
|
|
||||||
|
|
||||||
# Sync packages into StylesPath (.vale)
|
# sync packages into StylesPath
|
||||||
echo ""
|
echo "=== vale sync ==="; vale sync
|
||||||
echo "=== vale sync ==="
|
|
||||||
vale sync
|
|
||||||
|
|
||||||
# List installed style/package files so we can confirm rules are present
|
# list installed style files
|
||||||
echo ""
|
echo "=== .vale contents ==="; ls -la .vale || true
|
||||||
echo "=== .vale contents ==="
|
find .vale -type f -maxdepth 6 -print | sed -n '1,200p' || true
|
||||||
ls -la .vale || true
|
|
||||||
find .vale -type f -maxdepth 5 -print | sed -n '1,200p' || true
|
|
||||||
|
|
||||||
# Vale binary version & debug on one known file (shows which config and styles were loaded)
|
# show vale version and debug one known file (reveals loaded config, styles, rules)
|
||||||
echo ""
|
echo "=== vale --version & debug content/index.md ==="
|
||||||
echo "=== vale --version & debug ==="
|
|
||||||
vale --version
|
vale --version
|
||||||
vale --debug content/index.md || true
|
vale --debug content/index.md || true
|
||||||
|
|
||||||
# Lint each markdown file individually and print JSON + line output so nothing is filtered
|
# lint each markdown file one-by-one so nothing is filtered
|
||||||
echo ""
|
echo "=== Per-file JSON + line output ==="
|
||||||
echo "=== Linting files one-by-one (JSON then line) ==="
|
|
||||||
find content -name '*.md' -print0 | xargs -0 -n1 -I{} sh -c '
|
find content -name '*.md' -print0 | xargs -0 -n1 -I{} sh -c '
|
||||||
echo "----- {} -----";
|
echo "----- {} -----";
|
||||||
vale --output=JSON "{}" || true;
|
vale --output=JSON "{}" || true;
|
||||||
vale --output=line "{}" || true;
|
vale --output=line "{}" || true;
|
||||||
'
|
'
|
||||||
|
|
||||||
# Also run a recursive lint in case you prefer aggregated output
|
# also run aggregated recursive run as a final check
|
||||||
echo ""
|
|
||||||
echo "=== Recursive run (all content) ==="
|
echo "=== Recursive run (all content) ==="
|
||||||
vale --output=JSON content/ || true
|
vale --output=JSON content/ || true
|
||||||
vale --output=line content/ || true
|
vale --output=line content/ || true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue