File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5+ echo " Script started with $# arguments"
6+ echo " Arguments: $* "
7+ echo " Script location: $( dirname " $0 " ) "
8+
59cd " $( dirname " $0 " ) /.."
10+ echo " Changed to directory: $( pwd) "
611
712if [ $# -eq 0 ]; then
813 echo " Usage: $0 <file-with-paths> [additional-formatter-args...]"
1217
1318FILE_LIST=" $1 "
1419
20+ echo " Looking for file: $FILE_LIST "
21+
1522if [ ! -f " $FILE_LIST " ]; then
1623 echo " Error: File '$FILE_LIST ' not found"
1724 exit 1
@@ -23,9 +30,9 @@ if ! command -v ktfmt-fast-format &> /dev/null; then
2330fi
2431
2532# Process Kotlin files
26- kt_files= $( grep -E ' \.kt$ ' " $FILE_LIST " | grep -v ' ./buildSrc/build/ ' )
27- kt_files=$( grep -E ' \.kt$' " $FILE_LIST " | grep -v ' ./buildSrc/build/' )
28- echo " ==> Found $( echo " $kt_files " | wc -l ) Kotlin files: "
33+ echo " ==> Looking for Kotlin files "
34+ kt_files=$( grep -E ' \.kt$' " $FILE_LIST " | grep -v ' ./buildSrc/build/' || true )
35+ echo " ==> Done looking for Kotlin files"
2936
3037if [[ -n " $kt_files " ]]; then
3138 echo " ==> will format Kotlin files"
You can’t perform that action at this time.
0 commit comments