Linter settings changes

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Linter settings changes

Post by chennes »

The CI system uses linters on the C++ and Python code, and a lot of linting is sort of opinion/codebase-specific (there are a lot of heuristics involved). I thought I'd start this topic as a place for us to discuss settings that we think need changing/tweaking.

First on the list today is the C++ linter's "bugprone-suspicious-include" --

Code: Select all

#include "moc_DlgPageChooser.cpp"

 Check warning on line 103 in src/Mod/TechDraw/Gui/DlgPageChooser.cpp
suspicious #include of file with '.cpp' extension [bugprone-suspicious-include]
@openBrain do you know if it's possible to have an "exclusion" list for this rule"? Obviously all of the moc_*.cpp files are correct and should be allowed.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Linter settings changes

Post by openBrain »

Hi @chennes
Actually this was copied from previous CI and I have no particular knowledge about this. :)
According the doc, there is no such solution as filters are only based on extensions and don't support globbing : https://releases.llvm.org/11.0.0/tools/ ... clude.html
Post Reply