Hello community!
I have been testing the styling checks with integrated clang-tidy on PIO. Every seemed to be working just fine and implemented a github action to run the check on CI. To my surprise the outputs are different.
My .ini
for checks:
check_tool = clangtidy
check_skip_packages = yes
check_flags =
clangtidy: --config-file=.clang-tidy
check_src_filters =
+<./main/*>
+<./include/*>
-<*/network_tasks>
-<*/networking>
On action, ubuntu 20.04:
Run pio check --fail-on-defect=high --fail-on-defect=medium
********************************************************************************
If you like PlatformIO, please:
- star it on GitHub > https://github.com/platformio/platformio-core
- follow us on LinkedIn to stay up-to-date on the latest project news > https://www.linkedin.com/company/platformio/
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
********************************************************************************
Checking pico32 > clangtidy (platform: espressif32@4.4.0; board: pico32; framework: espidf)
--------------------------------------------------------------------------------
Tool Manager: Installing platformio/tool-clangtidy @ ~1.150005.0
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20%
Tool Manager: tool-clangtidy@1.150005.0 has been installed!
main/main.c:89: [medium:warning] invalid case style for variable 'prevTime' [readability-identifier-naming]
========================== [FAILED] Took 5.07 seconds ==========================
Component HIGH MEDIUM LOW
----------- ------ -------- -----
main 0 1 0
Total 0 1 0
Environment Tool Status Duration
------------- --------- -------- ------------
pico32 clangtidy FAILED 00:00:05.069
==================== 1 failed, 0 succeeded in 00:00:05.069 ====================
On local machines, windows 10 and osx:
platformio check --environment pico32
Checking pico32 > clangtidy (platform: espressif32@4.4.0; board: pico32; framework: espidf)
----------------------------------------------------------------------------------------------------------------------------------------------------
No defects found
============================================================ [PASSED] Took 0.23 seconds ============================================================
Environment Tool Status Duration
------------- --------- -------- ------------
pico32 clangtidy PASSED 00:00:00.227
=========================================================== 1 succeeded in 00:00:00.227 ===========================================================
* Terminal will be reused by tasks, press any key to close it.
Same .clang-tidy file in both cases. I have tried running manually both commands and no changes on presented outputs.
Any insights?