From 670c00ef705fca819f41509804d4f59e43f94ed1 Mon Sep 17 00:00:00 2001 From: Thomas Kuschel Date: Fri, 16 Oct 2026 12:20:38 +0200 Subject: [PATCH] Set the warnings to pedantic for my own code --- platformio.ini | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/platformio.ini b/platformio.ini index 900d690..d251a57 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,12 +1,6 @@ ; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html +; Project: FoxMesh +; Author: Tom OE3TKT [platformio] ; Enable global PlatformIO Cache @@ -20,14 +14,30 @@ monitor_speed = 115200 monitor_filters = esp32_exception_decoder ; lib_deps = bodmer/TFT_eSPI@^2.5.43 -; Zwingt PlatformIO, die mit Core 6.2.0 kompatible SCons-Version zu nutzen -platform_packages = - platformio/tool-scons @ ~4.41101.0 +; Forces PlatformIO to use the customized SCons engine to prevent firmware.elf build errors +;platform_packages = +; platformio/tool-scons @ ~4.41101.0 -; Hardware-specific macro definitions +; Advanced Compiler Configurations and Maximum Warning Profiles build_flags = - ;-D CONFIG_IDF_TARGET_ESP32=y - -D CCACHE_ENABLE=1 + ; REMOVED: CONFIG_IDF_TARGET_ESP32 (automatically predefined by PlatformIO's framework engine) + -D CCACHE_ENABLE=1 + -Wno-error=pedantic + -Wno-pedantic + +; --- STRICT MODE FOR MY OWN CODE ONLY --- +; These flags are strictly applied ONLY to files inside the src/ directory. +; The ESP-IDF framework is completely excluded from these rules! + ; Maximum Compiler Warnings (Strict Mode) +build_src_flags = + -Wall ; Enables all standard compiler warning flags + -Wextra ; Enables additional strict development warnings + -Wpedantic ; Enforces strict ISO C++ standard compliance (only on own files) + -Wconversion ; Warns on implicit type conversions (e.g., int to uint8_t) + -Wshadow ; Warns if a local variable shadows another variable in scope + -Werror ; Promotes all warnings to hard compilation errors to guarantee clean code + +; Serial flashing interface configuration overrides (leave commented out for dynamic CLI arguments) ; upload_port = /dev/ttyUSB0 ; monitor_port = /dev/ttyUSB0