This commit is contained in:
parent
323ccd14e7
commit
aafe8621d3
1 changed files with 32 additions and 19 deletions
51
.github/workflows/lint.yml
vendored
51
.github/workflows/lint.yml
vendored
|
|
@ -49,39 +49,52 @@ jobs:
|
||||||
|
|
||||||
- name: Install and run Vale
|
- name: Install and run Vale
|
||||||
run: |
|
run: |
|
||||||
|
# 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"
|
||||||
|
|
||||||
echo "=== Where are we? ==="
|
# Ensure we are in the repository root
|
||||||
|
echo "=== PWD ==="
|
||||||
pwd
|
pwd
|
||||||
|
|
||||||
|
# Show .vale.ini so we can confirm patterns / BasedOnStyles
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Content directory exists? ==="
|
echo "=== .vale.ini ==="
|
||||||
ls -la /workspace/g_it/site/content/ 2>/dev/null || echo "NOT FOUND at absolute path"
|
sed -n '1,200p' .vale.ini || echo "No .vale.ini found"
|
||||||
ls -la content/ 2>/dev/null || echo "NOT FOUND at relative path"
|
|
||||||
|
|
||||||
|
# Confirm markdown files exist
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Find all markdown files ==="
|
echo "=== Markdown files (first 50) ==="
|
||||||
find /workspace/g_it/site -name "*.md" -type f 2>/dev/null | head -20
|
find content -name '*.md' -print | sed -n '1,50p' || true
|
||||||
|
|
||||||
|
# Sync packages into StylesPath (.vale)
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Sync ==="
|
echo "=== vale sync ==="
|
||||||
vale sync
|
vale sync
|
||||||
|
|
||||||
echo "=== Vale version & debug single file ==="
|
# List installed style/package files so we can confirm rules are present
|
||||||
|
echo ""
|
||||||
|
echo "=== .vale contents ==="
|
||||||
|
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)
|
||||||
|
echo ""
|
||||||
|
echo "=== vale --version & debug ==="
|
||||||
vale --version
|
vale --version
|
||||||
vale --debug /workspace/g_it/site/content/test.md || true
|
vale --debug content/index.md || true
|
||||||
|
|
||||||
echo "=== Vale line output for one file ==="
|
|
||||||
vale --output=line /workspace/g_it/site/content/index.md || true
|
|
||||||
|
|
||||||
echo "=== Vale JSON output for one file ==="
|
|
||||||
vale --output=JSON /workspace/g_it/site/content/index.md || true
|
|
||||||
|
|
||||||
|
# Lint each markdown file individually and print JSON + line output so nothing is filtered
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Run Vale with explicit path ==="
|
echo "=== Linting files one-by-one (JSON then line) ==="
|
||||||
vale --output=line /workspace/g_it/site/content/ || true
|
find content -name '*.md' -print0 | xargs -0 -n1 -I{} sh -c '
|
||||||
|
echo "----- {} -----";
|
||||||
|
vale --output=JSON "{}" || true;
|
||||||
|
vale --output=line "{}" || true;
|
||||||
|
'
|
||||||
|
|
||||||
|
# Also run a recursive lint in case you prefer aggregated output
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Or try with glob pattern ==="
|
echo "=== Recursive run (all content) ==="
|
||||||
vale --output=line "/workspace/g_it/site/content/**/*.md" 2>/dev/null || vale --output=line "content/**/*.md" 2>/dev/null || true
|
vale --output=JSON content/ || true
|
||||||
|
vale --output=line content/ || true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue