Skip to content

Conversation

@rgetz
Copy link

@rgetz rgetz commented Nov 27, 2025

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.

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.
@sonarqubecloud
Copy link

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.

1 participant