Cannot get PVS Studio to work (Missing preprocessed file)
See original GitHub issue- PlatformIO Core. If you’ve found a bug, please provide an information below.
Configuration
Operating system: Windows 10
PlatformIO Version (platformio --version
): PlatformIO, version 4.3.2a1
Description of problem
I try to use the (great) new feature of using PVS Studio to check my code.
Relevant part of my platformio.ini file:
[debug_pio]
build_type = debug
;check_tool = clangtidy
check_tool = pvs-studio
check_flags =
pvs-studio: --analysis-mode=4 --errors-off=V532,V586 --lic-file=../pvs_studio.lic
build_flags = ${compiler_warnings.build_flags}
The envs needing this include this via this PlatformIO extends option:
extends = debug_pio
Actual Results
PS C:\GitHub\TD-er\ESPEasy> pio check --environment spec_debug_beta_custom_ESP8266_4M1M
Checking spec_debug_beta_custom_ESP8266_4M1M > pvs-studio (platform: https://github.com/platformio/platform-espressif8266.git; board: esp12e; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error: Missing preprocessed file 'C:\Users\gijs\AppData\Local\Temp\piocheck20x7f88s\1luqj9ex.i'
Error: Missing preprocessed file 'C:\Users\gijs\AppData\Local\Temp\piocheck20x7f88s\1luqj9ex.i'
Error: Missing preprocessed file 'C:\Users\gijs\AppData\Local\Temp\piocheck20x7f88s\1luqj9ex.i'
Error: pvs-studio failed to perform check! Please examine tool output in verbose mode.
When I look at this directory while the check is still active, I do see the mentioned file is created (roughly 1.7 MB in my project)
It is created a few times.
But PVS studio is apparently not able to see the file.
Maybe an issue with \
vs /
???
Expected Results
Successful check by PVS studio.
If problems with PlatformIO Build System:
The content of platformio.ini
:
[debug_pio]
build_type = debug
;check_tool = clangtidy
check_tool = pvs-studio
check_flags =
pvs-studio: --analysis-mode=4 --errors-off=V532,V586 --lic-file=../pvs_studio.lic
build_flags = ${compiler_warnings.build_flags}
I do have an active license file and the error is different when I rename the license file, so it appears to be loaded by PVS-studio.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
troubleshooting - PVS-Studio
If you get clang's preprocessing errors, try setting the plugin to use only the cl.exe preprocessor (PVS-Studio -> Options -> Common Analyzer ...
Read more >PVS-Studio doesn't process header files - Stack Overflow
Having just one header file is insufficient, as PVS-Studio will not have enough information to preprocess it correctly.
Read more >How PVS-Studio for Windows got new monitoring mode | by Unicorn ...
When using the monitoring mechanism of the CLMonitor utility under Windows, users could encounter an issue: the analyzer sometimes missed random source files....
Read more >Intermodular analysis of C++ projects in PVS-Studio - Habr.com
This stage results in so-called preprocessed files. ... We can't apply the approach above to the PVS-Studio tool.
Read more >pvs-studio - Standard C++
To check C++ and C# Visual Studio PVS-Studio_Cmd.exe projects, you can pass the suppression file directly. Before this, you could add suppressed warnings...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It looks like that the toolchain (at least
xtensa
) fails to determine what language is used in.ino
files. I’ll check how we can resolve this.Thank for the clarification!