feat: update IWYU fix script to default to aggressive mode and clean up option prompts and add to format script
This commit is contained in:
parent
ab2db513c0
commit
7322360650
@ -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)
|
||||
|
||||
@ -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' _ {} \;
|
||||
Loading…
Reference in New Issue
Block a user