feat(linter): afegir checks llvm-include-order i misc-include-cleaner
- Check 11: llvm-include-order (0 errors - codi ja compleix) - Check 12: misc-include-cleaner (detectar includes no usats i faltants) - Configurar IgnoreHeaders per SDL3 (genera falsos positius) - Fix: afegir <cstdint> a nau.hpp, enemic.hpp, bala.hpp - Fix: afegir <cmath> a nau.hpp, enemic.hpp (std::cos/sin) Include order validat segons LLVM coding standards. Headers més nets i compilació més ràpida.
This commit is contained in:
@@ -31,6 +31,10 @@ Checks:
|
|||||||
- -bugprone-switch-missing-default-case # Excluido (no todos los switches necesitan default)
|
- -bugprone-switch-missing-default-case # Excluido (no todos los switches necesitan default)
|
||||||
- -bugprone-implicit-widening-of-multiplication-result # Excluido (valores pequeños, sin overflow)
|
- -bugprone-implicit-widening-of-multiplication-result # Excluido (valores pequeños, sin overflow)
|
||||||
- -bugprone-exception-escape # Excluido (excepciones en main terminan el programa - OK)
|
- -bugprone-exception-escape # Excluido (excepciones en main terminan el programa - OK)
|
||||||
|
# ✅ Check 11: llvm-include-order (validar orden de includes - 0 errores)
|
||||||
|
- llvm-include-order
|
||||||
|
# ⏳ Check 12: misc-include-cleaner (detectar includes no usados y faltantes)
|
||||||
|
- misc-include-cleaner
|
||||||
|
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
# No usar HeaderFilterRegex - usamos .clang-tidy local en source/core/audio/ para excluir
|
# No usar HeaderFilterRegex - usamos .clang-tidy local en source/core/audio/ para excluir
|
||||||
@@ -95,3 +99,6 @@ CheckOptions:
|
|||||||
|
|
||||||
# Parámetros en lower_case
|
# Parámetros en lower_case
|
||||||
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
|
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
|
||||||
|
|
||||||
|
# misc-include-cleaner: Ignorar SDL (genera falsos positivos)
|
||||||
|
- { key: misc-include-cleaner.IgnoreHeaders, value: 'SDL3/.*' }
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/graphics/shape.hpp"
|
#include "core/graphics/shape.hpp"
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/graphics/shape.hpp"
|
#include "core/graphics/shape.hpp"
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/graphics/shape.hpp"
|
#include "core/graphics/shape.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user