You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PlatformIO Version: PlatformIO Core, version 6.1.11
Espressif 8266 Version: 4.2.1
Description of problem
Steps to Reproduce
Create a project with platform: espressif8266 and framework: arduino
Configure clangtidy as a check_tool in platformio.ini
Write some c++ code with clangtidy warnings (for example, define a magic number: 60.0 is a magic number; consider replacing it with a named constant)
Use c++17 features in your code. For example, define an inline constexpr
Run pio check - clangtidy will report using c++17 features as a warning: [medium:warning] inline variables are a C++17 extension [clang-diagnostic-c++17-extensions] together with other warnings of the project
Add --extra-arg=-std=c++17 as a flag for clangtidy
Run pio check again
Actual Results
clangtidy exits immediately, and does not find any warnings: clangtidy PASSED 00:00:00.247
pio check -v with --extra-arg=-std=c++17: extra-args.log
Expected Results
clangtidy reports all warnings except for c++17 warnings
If problems with PlatformIO Build System:
The content of platformio.ini:
[env]framework = arduino
build_flags =
-std=c++17
check_tool = clangtidy
check_flags = --checks=* --extra-arg=-std=c++17
[env:esp_wroom_02]platform = espressif8266
; Any board triggers the same issueboard = esp_wroom_02
Source file to reproduce issue:
#include<Arduino.h>inlineconstexprint cpp17_warning = 123; // Will trigger a c++17 warningvoidsetup()
{
delay(500); // Will trigger a Magic number warning
}
Additional info
The issue seems to be only reproducible when using the arduino framework. esp8266-nonos-sdk and esp8266-rtos-sdk frameworks did not suffer from the same issue.
The issue seems related to espressif8266 platform, as the issue is not reproducible on atmelavr or espressif32 platforms using arduino framework.
The text was updated successfully, but these errors were encountered:
Configuration
Operating system: macOS 13.6.1 (Intel)
PlatformIO Version: PlatformIO Core, version 6.1.11
Espressif 8266 Version: 4.2.1
Description of problem
Steps to Reproduce
espressif8266
and framework:arduino
clangtidy
as acheck_tool
inplatformio.ini
60.0 is a magic number; consider replacing it with a named constant
)c++17
features in your code. For example, define aninline constexpr
pio check
- clangtidy will report using c++17 features as a warning:[medium:warning] inline variables are a C++17 extension [clang-diagnostic-c++17-extensions]
together with other warnings of the project--extra-arg=-std=c++17
as a flag forclangtidy
pio check
againActual Results
clangtidy exits immediately, and does not find any warnings:
clangtidy PASSED 00:00:00.247
pio check -v
without--extra-arg=-std=c++17
: no-extra-args.logpio check -v
with--extra-arg=-std=c++17
: extra-args.logExpected Results
clangtidy reports all warnings except for
c++17
warningsIf problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
The issue seems to be only reproducible when using the
arduino
framework.esp8266-nonos-sdk
andesp8266-rtos-sdk
frameworks did not suffer from the same issue.The issue seems related to
espressif8266
platform, as the issue is not reproducible onatmelavr
orespressif32
platforms usingarduino
framework.The text was updated successfully, but these errors were encountered: