mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
clang-tidy: exclude NuttX-only drivers and emscripten from SITL analysis
These files depend on platform headers (px4_platform/gpio/mcp.hpp, device::I2C, emscripten/emscripten.h) that are unavailable in the SITL/clang build, causing clang-tidy to report compiler errors: - src/lib/drivers/mcp_common (NuttX GPIO) - src/drivers/gpio (MCP23009, MCP23017) - src/lib/drivers/smbus (I2C bus driver) - src/modules/commander/failsafe/emscripten (emscripten SDK) Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
parent
47b3f5f6f9
commit
d74007dc87
5
Makefile
5
Makefile
@ -497,11 +497,14 @@ px4_sitl_default-clang:
|
||||
# - Test code (allowed looser style)
|
||||
# - Example code (educational, not production)
|
||||
# - Vendored third-party code (e.g., CMSIS_5)
|
||||
# - NuttX-only drivers that depend on platform headers unavailable in SITL builds
|
||||
# (MCP GPIO, SMBus/I2C)
|
||||
# - Emscripten failsafe web build (requires emscripten SDK not present in container)
|
||||
#
|
||||
# To add manual exclusions, append to CLANG_TIDY_EXCLUDE_EXTRA below.
|
||||
# Submodules are automatically excluded - no action needed when adding new ones.
|
||||
CLANG_TIDY_SUBMODULES := $(shell git config --file .gitmodules --get-regexp path | awk '{print $$2}' | tr '\n' '|' | sed 's/|$$//')
|
||||
CLANG_TIDY_EXCLUDE_EXTRA := src/systemcmds/tests|src/examples|src/modules/gyro_fft/CMSIS_5
|
||||
CLANG_TIDY_EXCLUDE_EXTRA := src/systemcmds/tests|src/examples|src/modules/gyro_fft/CMSIS_5|src/lib/drivers/mcp_common|src/drivers/gpio|src/lib/drivers/smbus|src/modules/commander/failsafe/emscripten
|
||||
CLANG_TIDY_EXCLUDE := $(CLANG_TIDY_SUBMODULES)|$(CLANG_TIDY_EXCLUDE_EXTRA)
|
||||
|
||||
clang-tidy: px4_sitl_default-clang
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user