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 1
1
RED=" "
2
+ GREEN=" "
2
3
YELLOW=" "
3
4
BLUE=" "
4
5
WHITE=" "
@@ -11,6 +12,7 @@ set_colors() {
11
12
# If color is forced (always) or auto and we are on a tty, enable color.
12
13
if [[ " $default_color " == " always" ]] || [[ " $default_color " == " auto" && -t 1 ]]; then
13
14
RED=' \033[1;31m'
15
+ GREEN=' \033[1;32m'
14
16
YELLOW=' \033[1;33m'
15
17
BLUE=' \033[1;34m'
16
18
WHITE=' \033[1;37m'
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ report_result() {
31
31
local status=" $1 "
32
32
local message=" $2 "
33
33
if [ " $status " -eq 0 ]; then
34
- printf " ${GREEN} ✓ ${NC} \n"
34
+ printf " [ ${GREEN} OK ${NC} ] \n"
35
35
else
36
- printf " ${RED} ✗ ${NC} \n"
36
+ printf " [ ${RED} FAIL ${NC} ] \n"
37
37
if [ -n " $message " ]; then
38
38
ERRORS_FOUND+=(" $message " )
39
39
fi
334
334
# Clear the progress line
335
335
printf " \r%*s\r" 50 " "
336
336
337
- # === SUMMARY ===
338
- printf " \n${CYAN} === Pre-commit Check Summary === ${NC} \n\n "
337
+ # Summary
338
+ printf " \n"
339
339
340
340
# Show file changes
341
341
printf " ${CYAN} Files to be committed:${NC} \n"
359
359
if [ ${# ERRORS_FOUND[@]} -gt 0 ]; then
360
360
printf " \n${RED} Errors found:${NC} \n"
361
361
for error in " ${ERRORS_FOUND[@]} " ; do
362
- printf " ${RED} ✗ ${NC} %s\n" " $error "
362
+ printf " [ ${RED} FAIL ${NC} ] %s\n" " $error "
363
363
done
364
364
fi
365
365
Original file line number Diff line number Diff line change @@ -64,17 +64,18 @@ run_build_checks() {
64
64
echo " "
65
65
66
66
# Clean previous build artifacts for fresh check
67
- echo -e " ${YELLOW} Cleaning previous build...${NC} "
67
+ printf " ${YELLOW} Cleaning previous build...${NC} "
68
68
make clean > /dev/null 2>&1 || true
69
+ printf " [ ${GREEN} OK${NC} ]\n"
69
70
70
- echo -e " ${YELLOW} Building project...${NC} "
71
+ printf " ${YELLOW} Building project...${NC} "
71
72
72
73
# Capture build output for better error reporting
73
74
build_output=$( make 2>&1 )
74
75
build_result=$?
75
76
76
77
if [ $build_result -ne 0 ]; then
77
- echo -e " ${RED} Build failed! ${NC} "
78
+ printf " [ ${RED} FAIL ${NC} ]\n "
78
79
echo " "
79
80
echo " Build output:"
80
81
echo " ============="
@@ -85,7 +86,7 @@ run_build_checks() {
85
86
return 1
86
87
fi
87
88
88
- echo -e " ${GREEN} ✓ Build successful ${NC} "
89
+ printf " [ ${GREEN} OK ${NC} ]\n "
89
90
90
91
# Additional checks could be added here
91
92
# For example: basic tests, format checks, etc.
You can’t perform that action at this time.
0 commit comments