Skip to content

Commit

Permalink
Check markdown in files known to git, not all files
Browse files Browse the repository at this point in the history
As currently written, `check=all scripts/githooks/check-markdown-format` will not only check files intentionally checked in, it will also check anything under, for instance, `.venv/` or `node_modules/` which are out of our control.

This change makes it only pay attention to checked-in files.

Signed-off-by: Alex Young <[email protected]>
  • Loading branch information
regularfry authored Apr 19, 2024
1 parent 9d88dae commit b3214cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/githooks/check-markdown-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function main() {
check=${check:-working-tree-changes}
case $check in
"all")
files="$(find ./ -type f -name "*.md")"
files="$(git ls-files "*.md")"
;;
"staged-changes")
files="$(git diff --diff-filter=ACMRT --name-only --cached "*.md")"
Expand Down

0 comments on commit b3214cb

Please sign in to comment.