Description of problem:
It is possible to use cppcheck with custom rules, but this is not enabled in the Fedora build.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. cppcheck --rule=.+ SRCFILE
cppcheck: error: unrecognized command line option: "--rule=.+".
Since ".+" matches everything, it should dump the full representation of SRCFILE, as described in the "Writing Cppcheck rules" article.
A little history spelunking shows that the rpm used to define HAVE_RULES, but removed it in fedpkg commit 5165102588cd for 1.51-2. Upstream flipped the default to HAVE_RULES=no in commit 34e2a2ad663ae, released in 1.52. You can also see in koji that the cppcheck-1.51 rpm requires libpcre.so.0, and the 1.52 rpm does not.
It's very close timing between upstream flipping the default HAVE_RULES and the Fedora rpm undefining it, but I hope that's just coincidence, so Fedora can enable rules again.
I've switched HAVE_RULES to yes in rawhide:
If Susi does not object to this change, I'll build for f20 too.
It's quite possible HAVE_RULES was switched to no because it failed to build:
this was fixed in 1.55 or so.
(In reply to François Cami from comment #1)
> If Susi does not object to this change, I'll build for f20 too.
Of course not, go ahead!
Thank you Susi!
Building for f20:
cppcheck-1.63-3.fc20 has been submitted as an update for Fedora 20.
Thank you for the quick turnaround!
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cppcheck-1.63-3.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
You're welcome. It was an easy one, though - bugs rarely contain the fix for themselves :)
cppcheck-1.63-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.