-
Notifications
You must be signed in to change notification settings - Fork 6
Removing cert from addons due to premium feature #73
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes usage of cppcheck's CERT add-on (a premium feature) from the engine and public pattern metadata, and extends the multiple-tests documentation fixtures with null-pointer-related checks and additional addons. It also tweaks repository tooling metadata (patterns, docs, and .gitignore) accordingly.
Changes:
- Disable the
certcppcheck add-on inCPPCheck.scalaand removecert-*entries fromdocs/patterns.jsonandaddons/patterns.json. - Extend
docs/multiple-tests/without-config-filefixtures with a newtest.cpp, expectedresults.xmlentries, and additional modules inpatterns.xml(null pointer, threadsafety, y2038). - Update
.gitignoreto ignore extra GitHub instructions for VS Code AI rules.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/main/scala/codacy/cppcheck/CPPCheck.scala |
Stops enabling the cert cppcheck add-on while keeping other addons (y2038, threadsafety, MISRA) active. |
docs/patterns.json |
Removes cert-* patterns from the global pattern list so only non-premium patterns remain documented. |
addons/patterns.json |
Drops cert-* patterns from the add-on pattern set, aligning it to threadsafety and y2038 only. |
docs/multiple-tests/without-config-file/src/test.cpp |
Adds a sample source file to exercise null pointer and redundant-null-check patterns. |
docs/multiple-tests/without-config-file/results.xml |
Defines expected cppcheck findings for the new test.cpp sample. |
docs/multiple-tests/without-config-file/patterns.xml |
Enables null pointer, threadsafety, and y2038 modules for the multi-test fixture run. |
.gitignore |
Ensures additional GitHub instruction files are ignored by Git. |
Comments suppressed due to low confidence (2)
docs/patterns.json:1623
- Removing the
cert-*entries fromdocs/patterns.jsonbut keeping their descriptions indocs/description/description.jsonleaves the public pattern documentation out of sync with the actual supported patterns. To avoid documenting patterns that are no longer available (and potential confusion in any generated docs or UIs), thecert-*description entries should be removed or clearly marked as unavailable alongside this change.
"patternId" : "threadsafety-threadsafety",
"level" : "Warning",
"category" : "ErrorProne"
}, {
"patternId" : "y2038-type-bits-not-64",
"level" : "Error",
"category" : "Security",
"subCategory" : "UnexpectedBehaviour"
}, {
addons/patterns.json:12
addons/patterns.jsonno longer exposes anycert-*patterns, butaddons/description/description.jsonstill contains description entries for those pattern IDs. For consistency between the add-on pattern metadata and what the engine actually supports, thecert-*description entries inaddons/description/description.jsonshould be removed or flagged as unavailable as part of this change.
"patternId" : "threadsafety-threadsafety",
"level" : "Warning",
"category" : "ErrorProne"
},
{
"patternId" : "y2038-type-bits-not-64",
"level" : "Error",
"category" : "Security",
"subCategory" : "UnexpectedBehaviour"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| val command: List[String] = List("cppcheck", "--enable=all") ++ | ||
| addonIfNeeded("cert") ++ | ||
| //addonIfNeeded("cert") ++ |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having addonIfNeeded("cert") left in as a commented-out call makes it unclear whether this add-on is intentionally and permanently disabled or just temporarily turned off. To improve maintainability, consider either removing the dead code entirely or replacing it with a short comment that explicitly states that the CERT add-on is a premium-only feature and therefore intentionally not enabled here.
| //addonIfNeeded("cert") ++ | |
| // CERT add-on is a premium-only feature and is intentionally not enabled here. |
Codacy's Analysis Summary0 new issue (≤ 1 medium issue) Review Pull Request in Codacy →
|
5b7158a to
e07b01f
Compare
No description provided.