File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 11RED=" "
2+ GREEN=" "
23YELLOW=" "
34BLUE=" "
45WHITE=" "
@@ -11,6 +12,7 @@ set_colors() {
1112 # If color is forced (always) or auto and we are on a tty, enable color.
1213 if [[ " $default_color " == " always" ]] || [[ " $default_color " == " auto" && -t 1 ]]; then
1314 RED=' \033[1;31m'
15+ GREEN=' \033[1;32m'
1416 YELLOW=' \033[1;33m'
1517 BLUE=' \033[1;34m'
1618 WHITE=' \033[1;37m'
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ report_result() {
3131 local status=" $1 "
3232 local message=" $2 "
3333 if [ " $status " -eq 0 ]; then
34- printf " ${GREEN} ✓ ${NC} \n"
34+ printf " [ ${GREEN} OK ${NC} ] \n"
3535 else
36- printf " ${RED} ✗ ${NC} \n"
36+ printf " [ ${RED} FAIL ${NC} ] \n"
3737 if [ -n " $message " ]; then
3838 ERRORS_FOUND+=(" $message " )
3939 fi
334334# Clear the progress line
335335printf " \r%*s\r" 50 " "
336336
337- # === SUMMARY ===
338- printf " \n${CYAN} === Pre-commit Check Summary === ${NC} \n\n "
337+ # Summary
338+ printf " \n"
339339
340340# Show file changes
341341printf " ${CYAN} Files to be committed:${NC} \n"
359359if [ ${# ERRORS_FOUND[@]} -gt 0 ]; then
360360 printf " \n${RED} Errors found:${NC} \n"
361361 for error in " ${ERRORS_FOUND[@]} " ; do
362- printf " ${RED} ✗ ${NC} %s\n" " $error "
362+ printf " [ ${RED} FAIL ${NC} ] %s\n" " $error "
363363 done
364364fi
365365
Original file line number Diff line number Diff line change @@ -64,17 +64,18 @@ run_build_checks() {
6464 echo " "
6565
6666 # Clean previous build artifacts for fresh check
67- echo -e " ${YELLOW} Cleaning previous build...${NC} "
67+ printf " ${YELLOW} Cleaning previous build...${NC} "
6868 make clean > /dev/null 2>&1 || true
69+ printf " [ ${GREEN} OK${NC} ]\n"
6970
70- echo -e " ${YELLOW} Building project...${NC} "
71+ printf " ${YELLOW} Building project...${NC} "
7172
7273 # Capture build output for better error reporting
7374 build_output=$( make 2>&1 )
7475 build_result=$?
7576
7677 if [ $build_result -ne 0 ]; then
77- echo -e " ${RED} Build failed! ${NC} "
78+ printf " [ ${RED} FAIL ${NC} ]\n "
7879 echo " "
7980 echo " Build output:"
8081 echo " ============="
@@ -85,7 +86,7 @@ run_build_checks() {
8586 return 1
8687 fi
8788
88- echo -e " ${GREEN} ✓ Build successful ${NC} "
89+ printf " [ ${GREEN} OK ${NC} ]\n "
8990
9091 # Additional checks could be added here
9192 # For example: basic tests, format checks, etc.
You can’t perform that action at this time.
0 commit comments