Skip to content

Conversation

@Harvester57
Copy link
Owner

No description provided.

Harvester57 and others added 18 commits December 8, 2025 16:20
Bumps the actions-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4` | `6` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5` | `6` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4` | `5` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4` | `5` |


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

Updates `actions/upload-artifact` from 4 to 5
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v5)

Updates `github/codeql-action` from 3 to 4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v3...v4)

Updates `codecov/codecov-action` from 4 to 5
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
- dependency-name: codecov/codecov-action
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
…ons-dependencies-7aa040f97f

actions: bump the actions-dependencies group with 5 updates
…ar#7988)

Motivation:
Cppcheck-htmlreport previously generated local annotated HTML for all
source files. For private or large repositories, generating local HTML
is unnecessary and cumbersome. It consumes additional disk space,
increases report generation time, and duplicates functionality already
provided by GitHub/GitLab browseable HTML pages. This patch allows the
cppcheck report itself to be public, while the actual source code
remains protected on GitHub/GitLab using their standard access controls.

Changes:
- Detect --source-dir URLs pointing to GitHub/GitLab.
- Use remote URLs in index.html instead of generating local HTML for
those files.
- Line numbers link directly to GitHub/GitLab with proper anchors
(#L123).
- Remote links open in a new tab (target="_blank"), preserving local
HTML behavior for normal files.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
…r#7993)

Currently, using browser back/forward buttons resets filtered issue
lists, even though checkbox states persist. This is confusing and makes
it hard to see the filtered results consistently.

Changes:
- Added a `reapplyFilters()` function that reapplies ID, severity,
classification, and tool filters based on the current checkbox states.
- Hooked `reapplyFilters()` to the `pageshow` event to restore filtered
classes when navigating with back/forward.

Tested on Chrome (144.0.7534.0 (Official Build) dev (64-bit))
Bumps the actions-dependencies group with 1 update: [actions/cache](https://github.com/actions/cache).


Updates `actions/cache` from 4 to 5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
)

Co-authored-by: chrchr-github <noreply@github.com>
…ons-dependencies-97f38a5d32

actions: bump actions/cache from 4 to 5 in the actions-dependencies group
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
…urity-remediation

[StepSecurity] ci: Harden GitHub Actions
@gemini-code-assist
Copy link

Summary of Changes

Hello @Harvester57, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the Cppcheck project's continuous integration capabilities and internal code quality. Key improvements include the integration of Dependabot for automated dependency updates in GitHub Actions, a significant refactoring of how type sizes are calculated for improved accuracy, and a more flexible HTML report generation that can now link directly to remote source code repositories. Additionally, the changes refine function pointer detection, add support for CWE in addon messages, and provide clearer error feedback for invalid suppression comments, all supported by extensive test case updates.

Highlights

  • Dependabot Integration: Introduced Dependabot configuration for GitHub Actions, enabling daily checks for updates to ensure CI/CD pipeline dependencies are always current.
  • Enhanced HTML Report Generation: Improved the cppcheck-htmlreport tool to support linking to source files directly on remote GitHub/GitLab repositories via a new --source-dir URL option. This allows for lightweight reports without generating local annotated HTML files, and also includes a new JavaScript function to reapply filters on page navigation.
  • Refactored Type Size Calculation: The ValueType::typeSize function has been replaced by a more robust and flexible ValueType::getSizeOf method. This new method incorporates Accuracy and SizeOf enums, and includes advanced logic for handling struct members, bitfields, and alignment, leading to more accurate size determinations across the codebase.
  • Improved Function Pointer Detection: A new static helper function, Tokenizer::isFunctionPointer, has been implemented and integrated throughout the tokenizer and check modules for more consistent and reliable identification of function pointers.
  • CWE Support in Addons: Added functionality to parse and include Common Weakness Enumeration (CWE) information from addon messages in the Cppcheck output, providing richer detail for reported issues.
  • Enhanced Suppression Comment Handling: Improved error reporting for malformed suppression comments by explicitly flagging 'suppression without error ID' as an invalid suppression, helping users correct their suppression directives.
Ignored Files
  • Ignored by pattern: .github/workflows/** (22)
    • .github/workflows/CI-cygwin.yml
    • .github/workflows/CI-mingw.yml
    • .github/workflows/CI-unixish-docker.yml
    • .github/workflows/CI-unixish.yml
    • .github/workflows/CI-windows.yml
    • .github/workflows/asan.yml
    • .github/workflows/buildman.yml
    • .github/workflows/cifuzz.yml
    • .github/workflows/clang-tidy.yml
    • .github/workflows/codeql-analysis.yml
    • .github/workflows/coverage.yml
    • .github/workflows/coverity.yml
    • .github/workflows/cppcheck-premium.yml
    • .github/workflows/format.yml
    • .github/workflows/iwyu.yml
    • .github/workflows/release-windows-mingw.yml
    • .github/workflows/release-windows.yml
    • .github/workflows/scriptcheck.yml
    • .github/workflows/selfcheck.yml
    • .github/workflows/tsan.yml
    • .github/workflows/ubsan.yml
    • .github/workflows/valgrind.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several significant improvements. The most substantial change is a major refactoring of how type sizes are calculated, replacing typeSize with a much more accurate and comprehensive ValueType::getSizeOf implementation. This fixes several underlying issues and improves the precision of the analysis. Additionally, the PR enhances CI/CD workflows by adding Dependabot configuration for GitHub Actions and enabling cppcheck-htmlreport to link directly to source files in remote GitHub/GitLab repositories. Other notable changes include better handling of CWE information from addons, improved validation for inline suppressions, and various bug fixes and code cleanups, all supported by new and updated tests. My feedback includes a couple of suggestions to improve the new JavaScript code in the HTML report generator for better readability and maintainability. Overall, this is an excellent set of changes.

Comment on lines +359 to +403
function reapplyFilters() {
// Reapply ID filters
var idToggles = document.querySelectorAll(".idToggle");
for (var i = 1; i < idToggles.length; i++) {
var cb = idToggles[i];
var elements = document.querySelectorAll("." + cb.id);
for (var j = 0; j < elements.length; j++) {
elements[j].classList.toggle("id-filtered", !cb.checked);
}
}
// Reapply severity filters
var sevToggles = document.querySelectorAll(".sev_toggle");
for (var i = 0; i < sevToggles.length; i++) {
var cb = sevToggles[i];
var elements = document.querySelectorAll(".sev_" + cb.id);
for (var j = 0; j < elements.length; j++) {
elements[j].classList.toggle("severity-filtered", !cb.checked);
}
}
// Reapply classification filters
var classToggles = document.querySelectorAll(".class_toggle");
for (var i = 0; i < classToggles.length; i++) {
var cb = classToggles[i];
var elements = document.querySelectorAll(".class_" + cb.id);
for (var j = 0; j < elements.length; j++) {
elements[j].classList.toggle("classification-filtered", !cb.checked);
}
}
// Reapply tool filters
var toolToggles = document.querySelectorAll(".tool_toggle");
for (var i = 0; i < toolToggles.length; i++) {
var cb = toolToggles[i];
var elements;
if (cb.id == "clang-tidy")
elements = document.querySelectorAll("[class^=clang-tidy-]");
else
elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])");
for (var j = 0; j < elements.length; j++) {
elements[j].classList.toggle("tool-filtered", !cb.checked);
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The reapplyFilters function contains a lot of repetitive code for handling different filter types (ID, severity, classification). This could be refactored into a helper function to reduce duplication and improve maintainability. For example, a helper could take the toggle selector, a function to generate the element selector, and the class name to toggle.

var sevToggles = document.querySelectorAll(".sev_toggle");
for (var i = 0; i < sevToggles.length; i++) {
var cb = sevToggles[i];
var elements = document.querySelectorAll(".sev_" + cb.id);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line has an extra level of indentation, which seems to be a formatting mistake. While it doesn't break the code, it harms readability.

Suggested change
var elements = document.querySelectorAll(".sev_" + cb.id);
var elements = document.querySelectorAll(".sev_" + cb.id);

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.

8 participants