Skip to content

Commit 7d60611

Browse files
committed
refactor(ci): address review feedback
Signed-off-by: StandingMan <jmtangcs@gmail.com>
1 parent def065d commit 7d60611

6 files changed

Lines changed: 9 additions & 46 deletions

File tree

scripts/ci/binary-artifacts.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ while [[ $# -gt 0 ]]; do
4747
FILE_MODE="ci"
4848
shift
4949
;;
50-
--all)
51-
FILE_MODE="all"
52-
shift
53-
;;
5450
--help|-h)
55-
echo "Usage: $0 [--check] [--ci|--all] [files...]"
51+
echo "Usage: $0 [--check] [--ci] [files...]"
5652
echo ""
5753
echo "File selection:"
5854
echo " --ci Check files changed in PR (for CI)"

scripts/ci/markdownlint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,10 @@ while [[ $# -gt 0 ]]; do
3333
MODE="fix"
3434
shift
3535
;;
36-
--all)
37-
shift
38-
;;
3936
--help|-h)
40-
echo "Usage: $0 [--check|--fix] [--all] [files...]"
37+
echo "Usage: $0 [--check|--fix] [files...]"
4138
echo " --check Check markdown files for issues (default)"
4239
echo " --fix Automatically fix markdown issues"
43-
echo " --all Check all markdown files (default)"
4440
exit 0
4541
;;
4642
-*)

scripts/ci/shellcheck.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,10 @@ while [[ $# -gt 0 ]]; do
3535
MODE="fix"
3636
shift
3737
;;
38-
--all)
39-
shift
40-
;;
4138
--help|-h)
42-
echo "Usage: $0 [--check|--fix] [--all] [files...]"
39+
echo "Usage: $0 [--check|--fix] [files...]"
4340
echo " --check Check shell scripts for issues (default)"
4441
echo " --fix Show detailed suggestions for fixes"
45-
echo " --all Check all shell scripts (default)"
4642
exit 0
4743
;;
4844
-*)

scripts/ci/taplo.sh

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

scripts/ci/trailing-newline.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 for missing trailing newlines (default)"
5046
echo " --fix Add trailing newlines to files"
5147
echo ""
5248
echo "File selection:"
5349
echo " --ci Check files changed in PR (for CI)"
54-
echo " --all Check all tracked files (default)"
5550
echo " [files] Check specific files"
5651
exit 0
5752
;;

scripts/ci/trailing-whitespace.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 for trailing whitespace (default)"
5046
echo " --fix Remove trailing whitespace"
5147
echo ""
5248
echo "File selection:"
5349
echo " --ci Check files changed in PR (for CI)"
54-
echo " --all Check all tracked files (default)"
5550
echo " [files] Check specific files"
5651
exit 0
5752
;;

0 commit comments

Comments
 (0)