@@ -38,20 +38,15 @@ while [[ $# -gt 0 ]]; do
3838 FILE_MODE=" ci"
3939 shift
4040 ;;
41- --all)
42- FILE_MODE=" all"
43- shift
44- ;;
4541 --help|-h)
46- echo " Usage: $0 [--check|--fix] [--ci|--all ] [files...]"
42+ echo " Usage: $0 [--check|--fix] [--ci] [files...]"
4743 echo " "
4844 echo " Modes:"
4945 echo " --check Check TOML formatting (default)"
5046 echo " --fix Format TOML files"
5147 echo " "
5248 echo " File selection:"
5349 echo " --ci Check files changed in PR (for CI)"
54- echo " --all Check all TOML files (default)"
5550 echo " [files] Check specific files"
5651 exit 0
5752 ;;
@@ -92,23 +87,13 @@ get_files() {
9287 # Generic CI - compare with HEAD~1
9388 git diff --name-only --diff-filter=ACM HEAD~1 -- ' *.toml'
9489 else
95- # Local fallback: check all TOML files
96- find . -name ' *.toml' \
97- -not -path ' ./target/*' \
98- -not -path ' ./node_modules/*' \
99- -not -path ' ./.git/*' \
100- -not -path ' ./venv/*' \
101- -type f
90+ # Local fallback: check all tracked TOML files
91+ git ls-files -- ' *.toml'
10292 fi
10393 ;;
10494 all)
10595 # Get all TOML files (excluding common build directories)
106- find . -name ' *.toml' \
107- -not -path ' ./target/*' \
108- -not -path ' ./node_modules/*' \
109- -not -path ' ./.git/*' \
110- -not -path ' ./venv/*' \
111- -type f
96+ git ls-files -- ' *.toml'
11297 ;;
11398 esac
11499}
0 commit comments