Skip to content

Conversation

@heliocodacy
Copy link

No description provided.

Copilot AI review requested due to automatic review settings January 28, 2026 11:43
Ngwerume
Ngwerume previously approved these changes Jan 28, 2026
Copy link

Copilot AI left a 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 cert cppcheck add-on in CPPCheck.scala and remove cert-* entries from docs/patterns.json and addons/patterns.json.
  • Extend docs/multiple-tests/without-config-file fixtures with a new test.cpp, expected results.xml entries, and additional modules in patterns.xml (null pointer, threadsafety, y2038).
  • Update .gitignore to 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 from docs/patterns.json but keeping their descriptions in docs/description/description.json leaves 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), the cert-* 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.json no longer exposes any cert-* patterns, but addons/description/description.json still contains description entries for those pattern IDs. For consistency between the add-on pattern metadata and what the engine actually supports, the cert-* description entries in addons/description/description.json should 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") ++
Copy link

Copilot AI Jan 28, 2026

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.

Suggested change
//addonIfNeeded("cert") ++
// CERT add-on is a premium-only feature and is intentionally not enabled here.

Copilot uses AI. Check for mistakes.
@codacy-production
Copy link

codacy-production bot commented Jan 28, 2026

Codacy's Analysis Summary

0 new issue (≤ 1 medium issue)
0 new security issue (≤ 0 issue)
4 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

@heliocodacy heliocodacy enabled auto-merge January 28, 2026 11:50
@heliocodacy heliocodacy merged commit 58b0fda into master Jan 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants