diff --git a/bin/lint-markdown b/bin/lint-markdown index c3049fa3..49923a6b 100755 --- a/bin/lint-markdown +++ b/bin/lint-markdown @@ -18,6 +18,4 @@ else link_check_cmd="npx markdown-link-check" fi -# Recursively find all markdown files (*.md) in the current directory, excluding node_modules and .venv subfolders. -# Pass them in as args to the lint command using the handy `xargs` command. -find . -name \*.md -not -path "*/node_modules/*" -not -path "*/.venv/*" -not -path "*/.terraform/*" -print0 | xargs -0 -I{} sh -c "${link_check_cmd} --quiet --config ${link_check_config} {}" +git ls-files -z '*.md' | xargs -0 -I{} sh -c "${link_check_cmd} --quiet --config ${link_check_config} {}"