test: Detect indention done using tab (\t) in *.sh
This commit is contained in:
@ -10,10 +10,18 @@ function mod_tidy_fix {
|
||||
run go mod tidy || return 2
|
||||
}
|
||||
|
||||
function bash_ws_fix {
|
||||
log_callout "Fixing whitespaces in the bash scripts"
|
||||
# Makes sure all bash scripts do use ' ' (double space) for indention.
|
||||
log_cmd "% find ./ -name '*.sh' | xargs sed --follow-symlinks -i 's|\t| |g'"
|
||||
find ./ -print0 -name '*.sh' | xargs -0 sed --follow-symlinks -i 's|\t| |g'
|
||||
}
|
||||
|
||||
log_callout -e "\nFixing etcd code for you...\n"
|
||||
|
||||
run_for_modules run go fmt || exit 2
|
||||
run_for_modules mod_tidy_fix || exit 2
|
||||
run_for_module tests bom_fix || exit 2
|
||||
bash_ws_fix || exit 2
|
||||
|
||||
log_success -e "\nSUCCESS: etcd code is fixed :)"
|
||||
|
Reference in New Issue
Block a user