diff --git a/docs-linter/lint.sh b/docs-linter/lint.sh index 5069af4..e4b2add 100755 --- a/docs-linter/lint.sh +++ b/docs-linter/lint.sh @@ -26,9 +26,9 @@ MD_CLEAN=$(mktemp) # --- GATHER FILES --- echo "🎯 Gathering files from '$TARGET_DIR'..." -# CHANGE 1: Added |_partials to the exclusion list to fix MD041 errors on snippets find "$TARGET_DIR" -type f \( -name "*.md" -o -name "*.mdx" \) \ - | grep -vE "/(node_modules|_remotes|versioned_docs|_partials)/" \ + | grep -vE "/(node_modules|versioned_docs)/" \ + | grep -v "/_" \ > "$LIST_FILE" FILE_COUNT=$(wc -l < "$LIST_FILE") @@ -101,7 +101,6 @@ fi if [ -s "$VALE_CLEAN" ]; then echo "####################### VALE REPORT #######################" cat "$VALE_CLEAN" - # If Markdownlint failed, remind the user right after Vale's "All Good" message if [ "$MD_ERR" -gt 0 ]; then echo "🛑 BUT WAIT! You also have $MD_ERR Markdownlint errors (see above)." fi @@ -109,4 +108,4 @@ if [ -s "$VALE_CLEAN" ]; then fi # --- REMOVE TEMP FILES --- -rm "$LIST_FILE" "$VALE_LOG" "$MD_LOG" "$VALE_CLEAN" "$MD_CLEAN" \ No newline at end of file +rm "$LIST_FILE" "$VALE_LOG" "$MD_LOG" "$VALE_CLEAN" "$MD_CLEAN" diff --git a/unified-doc/build-docs.sh b/unified-doc/build-docs.sh index 3398b7f..296cd5c 100755 --- a/unified-doc/build-docs.sh +++ b/unified-doc/build-docs.sh @@ -126,7 +126,7 @@ lint_docs() { return fi - # 3. GENERATE CLEAN FILE LIST (Restored exactly as it was) + # 3. GENERATE CLEAN FILE LIST echo "🎯 Gathering file list..." LIST_FILE=$(mktemp) @@ -136,6 +136,8 @@ lint_docs() { | grep -v "/versioned_docs/" \ | grep -v "/build/" \ | grep -v "/.git/" \ + | grep -v "/_partials/" \ + | grep -v "/_[^/]*$" \ > "$LIST_FILE" FILE_COUNT=$(wc -l < "$LIST_FILE") @@ -170,12 +172,9 @@ lint_docs() { fi # 5. FORMAT & CLEAN LOGS - - # Format Vale: Strip absolute paths, strip color codes VALE_CLEAN=$(mktemp) sed "s|.*/_remotes/|_remotes/|g" "$VALE_LOG" | sed 's/\x1b\[[0-9;]*m//g' > "$VALE_CLEAN" - # Format Markdownlint: Strip absolute paths, strip color codes, AND Group by Filename MDLINT_CLEAN=$(mktemp) sed "s|.*/_remotes/|_remotes/|g" "$MDLINT_LOG" | sed 's/\x1b\[[0-9;]*m//g' | \ awk -F: ' @@ -216,7 +215,6 @@ lint_docs() { echo "####################### VALE REPORT #######################" cat "$VALE_CLEAN" - # The "Reality Check" Line if [ "$MD_ERR" -gt 0 ]; then echo "🛑 BUT WAIT! You also have $MD_ERR Markdownlint errors (see above)." fi