htmlreport: support remote GitHub/GitLab links for source files#7988
htmlreport: support remote GitHub/GitLab links for source files#7988danmar merged 1 commit intocppcheck-opensource:mainfrom rgetz:main
Conversation
|
sounds good. there is a ci failure. |
|
sorry - should have ran that locally before submitting. My bad. Alternative (more complicated) implementation would extract github url/branch from command line tools - but I thought this would be more fragile, and not lend itself to other url implementations (gitlab)... And I'm also assuming you want some doc updates? (Where/all?)
|
|
sorry for late reply.
the documentation is limited. But I would like you to document this in man/manual.md . You can copy the changes to man/manual-premium.md also. |
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. - Add doc in md pages Signed-off-by: Robin Getz <rgetz503@gmail.com>
No problem - I understand - everyone is busy. :) Let me know if you want any changes to suggested doc. |
|



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: