-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cppcheck and astyle versions #3037
Conversation
It is a bit of a mess right now and discussions are ongoing about this.
So suppressing the messages for now and leaving the |
Thanks for the update @firewave. That's an interesting link. |
Also please CC me on any future Cppcheck-related things. |
5158e34
to
0ec084f
Compare
cppcheck version updated to 2.14.1 Check times for both normal and extensive remain unaltered from 2.14.0 @firewave - I'm unsure what the best thing to do here is. Is it likely in later versions of cppcheck that we'll regain more rational behaviour without specifying a |
0ec084f
to
952db50
Compare
I totally missed the question. I will provide a full reply later on. But the gist of it to use the highest level of checking. Also I have been doing some profiling recently and provide some improvements so the next version could be faster out of the box (we again also hit some performance regressions - so mileage may vary). I am also in the midst of writing a preliminary tuning guide so that should also give you some more insights. |
I did not fully remember the post and did not read it again. So I missed the massive increase in runtime. You should keep it at normal and suppress the warning to keep the length of the job reasonable. |
ac5539f
to
0980152
Compare
Further investigations with astyle versions up to 3.5.1 revealed this problem:- https://sourceforge.net/p/astyle/bugs/572/ This isn't good for us, as expressions like @metalefty - are you OK to merge this? |
0980152
to
978453d
Compare
|
So this is caused by |
Remove the setting of CPPFLAGS for cppcheck v2.15.0 as this upsets the setting of FILESDIR
I filed https://trac.cppcheck.net/ticket/13066. Will backport the fix to 2.15 but as we seem to have other issues the 2.15.1 patch release might take a day or two. FYI I did a lot of performance improvements for 2.15 (more coming for 2.16). I hope it helps with the runtime so we add the remaining missing includes soon. |
- cppcheck 2.13.0 -> 2.15.0 - astyle 3.4.12 -> 3.4.14 Release notes - https://github.com/danmar/cppcheck/releases/tag/2.14.0 - https://github.com/danmar/cppcheck/releases/tag/2.14.1 - https://github.com/danmar/cppcheck/releases/tag/2.14.2 - https://github.com/danmar/cppcheck/releases/tag/2.15.0 - https://astyle.sourceforge.net/notes.html Later versions of astyle up to 3.5.1 have (currently) a problem with align-pointer=name which confuses multiplication with a pointer-dereference. See https://sourceforge.net/p/astyle/bugs/572/
Version 2.14.0 of cppcheck generates errors relating to the check level (e.g.):- common/base64.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] This does not happen with the same sources (commit f781962) under 2.13.0. This PR disables the warnings above for 2.14.0, but also allows a '-f' argument to be passed in to request an exhaustive test. This could be used (for example) before a major release. An exhaustive test takes a *lot* longer. The first run with a git runner was around an hour. The --check-level=flag was only added for 2.11.0, and so this now needs a version check.
978453d
to
82c95fa
Compare
Hi @firewave I was just looking at this! I'd just removed the |
Not if you do not want to lose quite some performance... And writing that the build already finished in 3 minutes. Which seems waaaaaaay too fast as it used to be almost 18 minutes. So removing Boost for now is fine but I guess I have to have a look afterwards (when I find the time) why it is so damn fast (not that I am complaining). |
You're the expert - I'll wait to hear from you before I make any more changes in this area. |
No need for further changes. This can be merged. I will keep you in the loop when Boost can be enabled again. |
@metalefty - are you happy to merge this? |
Yes, let's go. |
Bumped astyle and cppcheck to latest versions.
There's an issue with cppcheck which I'd appreciate a comment on. Version 2.13.0 was taking around 20 minutes or so to run. With 2.14.0, I get warnings like this with the same sources:-
If I use
--check-level=exhaustive
with 2.14.0, I get check times of around an hour:-https://github.com/matt335672/xrdp/actions/runs/8781923998/job/24094941025
However, if I just disable the warnings and go with
--check-level=normal
, I'm getting run times of about 4 minutes, 30 seconds:-https://github.com/matt335672/xrdp/actions/runs/8782777220/job/24097568007
Neither option seems as good to me, but I've gone for the shorter one. A longer run can still be requested manually.
Any thoughts appreciated.