šŸ”„ PlatformIO Home 3.0 Beta and powerful Project Inspection

Yes, itā€™s better to create separate [env:mydebug] env and add

[env:mydebug]
....
build_type = debug

We canā€™t get good information from ELF if it is built in release mode. We show this hint on configuration screen.

1 Like

Maybe it is also a nice to have to show this next to the inspect button when an env has been selected which does not have this build_type defined. Maybe even with a link to the documentation explaining it. (it is in the documentation, since I also found it :wink: )

1 Like

Itā€™s (link, note about build speed) actually there on that screen alreadyā€¦ just it doesnā€™t have flashing neon signs next to it to make it stand outā€¦ :laughing:

Making it moreā€¦ reactive? ā€¦ to the selected environment could certainly help.

Well, maybe I did use that link later, after all else failed. A warning based on the selected environment would be more visible I guess. But with those stubborn programmer kind of people who think they know best, you never know :slight_smile:

1 Like

Hmm, one remark. When looking through the Symbols I cannot use the search option (Windows, VS code)
I just cannot get the text dialog selected. My cursor is not appearing in it and I cannot enter any text.

This is known VSCode bug and Microsoft works on that. Just double click on PIO Home tab to activate it. See Can't type project name in PIO Home Ā· Issue #892 Ā· platformio/platformio-vscode-ide Ā· GitHub

1 Like

Since we only scan project sources, that warnings indeed seem a bit confusing. Here I described how you can easily ignore unwanted defects (the latest pio core from the dev branch is requried).
Thanks!

1 Like

@valeros That works greatā€¦ thank you! :slight_smile: Just need the same sort of patch added to the PIO home view as it appears it isnā€™t running with --inline-suppr enabled.

So when you say ā€˜only scan project sourcesā€™ā€¦ that still includes anything explicitly #include-ed? Hence why the 3rd party libraries, etc are also checked?

@pfeerick, @blackketter, @TD-er

We did a lot of changes which you requested above. Could upgrade PlatformIO IDE to 1.9.3? After this:

  1. Open system task manager and kill all python.exe processes
  2. Open PlatformIO IDE Terminal and type pio upgrade --dev.
  3. Restart VSCode.

Are we so close to the final release? :slight_smile:

P.S: The last thing is ā€œinspection progressā€. We work on that.

@ivankravets we are using it already with Tasmota
Awesome work!
Thx!

1 Like

The ā€œExplorerā€ feature is really nice. But I did find a bug.
When clicking on a file in the Statistics summary, you donā€™t jump to the file in the Explorer, but only to the Explorer tab itself.

Apart from that, it is a really, really nice feature :smile:

Not sure if it should be considered as a bug, but apparently some files in the build are referred to by ā€œc:ā€ as drive letter and some by ā€œC:ā€ (capitalization) and thus have different entries in the explorer tree.
A lot of files come from ā€œunknownā€ but some of them I included myself so their path must be known at compile time.

Thank you so much for valuable feedback! Would you like to use PIO Check for CI? Redirecting...

There is good docs for CLI too Redirecting...

1 Like

Looking really good Ivanā€¦ clickable links are working fine, those pesky blanking bugs are gone, Iā€™ve just realised you can navigate directly to the function code in the symbol viewer by clicking on it, as well as use the explorer to drill down and see whatā€™s using up flash and RAM.

Nice touch adding links for the CWE portion of the defect noticesā€¦ saves a copy/paste/google :wink:

Iā€™m seeing the same ā€˜inconsistencyā€™ that @TD-er mentionedā€¦ had to open a ESP8266 project to see it though. Iā€™m guessing itā€™s inconsistency in how the build scripts handle capitalisation?

Hi Ivan,

how can I not start using this when you provide examples of Tasmota?

Just found it and it looks stunning. Iā€™ll need to get acquainted first to provide any input.

Thx so far.

2 Likes

Regarding some never used warnings like

they are caused by CPPCheck MISRA:

Restricted by MISRA-C Rule 18.4 but so useful...

but would be nice to filter them out.

Theo, there are some options for both code analysis tools. See: Redirecting...

I guess it would be nice to have a set for ESP8266/Arduino and ESP32 of course, sinde CLang-Tidy also has a lot of things to say about how the F() macro is implemented. (about 1000 warnings in my code)

1 Like

Hi @arendst! Looks like there is no need to explicitly pass header files to Cppcheck as it checks the entire translation unit automatically. I pushed a small fix for this behavior, could you please try the latest PlatformIO from dev branch pio upgrade --dev in terminal. Thanks!

2 Likes

Thx. Indeed the amount of never used has lowered a lot and the MISRA induced ones have gone. I see I have to optimize a lot too :wink:

2 Likes

Hi @arendst, @pfeerick, @TD-er, @jason2866, @blackketter

The new RC3 of PIO Core is out with a new PIO Home. We implemented next-generation progress bar :slight_smile: with ā€œAI/MLā€ backend :)))) This is joke. In any case, the project inspection progress bar is very smart. The more you inspect your projects, the more accurate it will show estimated time.

If everything works well, we will release PIO Core 4.1.

Thanks for the amazing feedback and bug reports! The next step is

So do we need to worry about it learning that weā€™re the nuts making it do all that work, and fixing the problem permanently? :rofl: :rofl:

Progress bar seems to be working greatā€¦

Defect report seems to be shorter for me also for ESP8266 projects, so thanks @valeros for those header/include-related changes :wink:

4.1 is looking pretty good! And the UI for platformio.ini will make a LOT of people happy, especially newbies coming from Arduino :wink: