diff --git a/fix_iwyu_auto.sh b/fix_iwyu_auto.sh index 0889d1c..935f046 100755 --- a/fix_iwyu_auto.sh +++ b/fix_iwyu_auto.sh @@ -62,17 +62,17 @@ echo -e "${BLUE}🔧 Applying IWYU fixes...${NC}" iwyu_fix_options="" # Ask user for options -echo -e "${YELLOW}Choose fix options:${NC}" -echo -e " 1) ${GREEN}Safe mode${NC} (conservative, only safe changes)" -echo -e " 2) ${BLUE}Standard mode${NC} (recommended)" -echo -e " 3) ${YELLOW}Aggressive mode${NC} (with comments, updates existing)" -echo -n "Choose (1-3) [default: 2]: " +# echo -e "${YELLOW}Choose fix options:${NC}" +# echo -e " 1) ${GREEN}Safe mode${NC} (conservative, only safe changes)" +# echo -e " 2) ${BLUE}Standard mode${NC} (recommended)" +# echo -e " 3) ${YELLOW}Aggressive mode${NC} (with comments, updates existing)" +# echo -n "Choose (1-3) [default: 2]: " -if [ -t 0 ]; then # Only read input if running interactively - read -r choice -else - choice="2" -fi +# if [ -t 0 ]; then # Only read input if running interactively +# read -r choice +# else + choice="3" +# fi case "${choice:-2}" in 1) diff --git a/format.sh b/format.sh index a2a5571..d567d79 100755 --- a/format.sh +++ b/format.sh @@ -1,2 +1,8 @@ +#!/bin/bash + +./check_iwyu.sh +./fix_iwyu_auto.sh + +find webserv -name "*.hpp" -o -name "*.cpp" | xargs sed -i -E 's/#include "(.*)"/#include <\1>/g' find webserv -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i find webserv -name "*.hpp" -exec sh -c 'if ! grep -q "#pragma once" "$1"; then echo "Missing #pragma once in $1"; fi' _ {} \; \ No newline at end of file