File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Development
2
2
3
- This is a development focused supplement
4
- to [ CONTRIBUTING.md] ( https://github.com/coditory/.github/blob/main/CONTRIBUTING.md ) .
3
+ This is a development focused supplement to [ CONTRIBUTING.md] ( https://github.com/coditory/.github/blob/main/CONTRIBUTING.md ) .
5
4
6
5
## Pre commit hook (optional)
7
6
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ function run_ktlint {
7
7
exit 1
8
8
fi
9
9
# https://pinterest.github.io/ktlint/0.49.0/install/cli/#git-hooks
10
- KT_FILES=$( git diff --name-only --cached --relative --diff-filter=ACMR -- ' *.kt' ' *.kts' | sed ' s| |\\ |g ' )
10
+ KT_FILES=$( git diff --name-only --cached --relative --diff-filter=ACMR -- ' *.kt' ' *.kts' )
11
11
if [ -n " $KT_FILES " ]; then
12
12
echo -e " ${BLUE} Ktlint: linting $( echo " $KT_FILES " | wc -l) files${ENDCOLOR} "
13
13
start=" $( date +%s) "
14
- echo -n " $KT_FILES " | ktlint --relative --format --patterns-from-stdin
15
- echo -e " ${GREEN} Ktlint: finished in $(( $(date +% s) - start)) s${ENDCOLOR} "
14
+ echo -n " $KT_FILES " | tr ' \n ' ' , ' | ktlint --relative --format --patterns-from-stdin= ' , '
15
+ echo -e " ${GREEN} Ktlint: finished in $(( $(date +% s) - start)) s${ENDCOLOR} "
16
16
echo " $KT_FILES " | xargs git add
17
17
fi
18
18
}
You can’t perform that action at this time.
0 commit comments