iwyu
clang-format
This commit is contained in:
@@ -16,5 +16,11 @@ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S "$BASE_DIR" -B "$BUILD_DIR"
|
||||
# 🛠️ Ejecutar IWYU con fix_includes.py
|
||||
echo "🚀 Ejecutando IWYU..."
|
||||
iwyu_tool.py -p "$BUILD_DIR" -- -Xiwyu --mapping_file="$MAPPING_FILE" -Xiwyu --verbose=3 \
|
||||
| python3 /usr/bin/fix_includes.py --update_comments --reorder --nosafe_headers --dry_run
|
||||
| python3 /usr/bin/fix_includes.py --update_comments --reorder --nosafe_headers
|
||||
|
||||
# 🧹 Reemplazar // for por // Para en líneas de #include
|
||||
echo "✍️ Corrigiendo comentarios en includes..."
|
||||
find "$BASE_DIR" -type f \( -name "*.cpp" -o -name "*.h" \) -exec \
|
||||
sed -i '/^#include .*\/\/ for/s/\/\/ for/\/\/ Para/' {} +
|
||||
|
||||
echo "✅ Script completado."
|
||||
|
||||
26
linux_utils/run_iwyu_dry_run.sh
Executable file
26
linux_utils/run_iwyu_dry_run.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 🏁 Ruta base del proyecto
|
||||
BASE_DIR="/home/sergio/gitea/coffee_crisis_arcade_edition"
|
||||
|
||||
# 📁 Ruta al build
|
||||
BUILD_DIR="$BASE_DIR/build"
|
||||
|
||||
# 📄 Archivo de mapping personalizado
|
||||
MAPPING_FILE="$BASE_DIR/linux_utils/sdl3_mapping.imp"
|
||||
|
||||
# 📦 Generar compile_commands.json
|
||||
echo "🔧 Generando compile_commands.json..."
|
||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S "$BASE_DIR" -B "$BUILD_DIR"
|
||||
|
||||
# 🛠️ Ejecutar IWYU con fix_includes.py
|
||||
echo "🚀 Ejecutando IWYU..."
|
||||
iwyu_tool.py -p "$BUILD_DIR" -- -Xiwyu --mapping_file="$MAPPING_FILE" -Xiwyu --verbose=3 \
|
||||
| python3 /usr/bin/fix_includes.py --update_comments --reorder --nosafe_headers --dry_run
|
||||
|
||||
# 🧹 Reemplazar // for por // Para en líneas de #include
|
||||
echo "✍️ Corrigiendo comentarios en includes..."
|
||||
find "$BASE_DIR" -type f \( -name "*.cpp" -o -name "*.h" \) -exec \
|
||||
sed -i '/^#include .*\/\/ for/s/\/\/ for/\/\/ Para/' {} +
|
||||
|
||||
echo "✅ Script completado."
|
||||
Reference in New Issue
Block a user