Skip to content
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

fix html report generation with pygments >= 2.12.0 #4110

Merged
merged 1 commit into from May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/scriptcheck.yml
Expand Up @@ -69,8 +69,7 @@ jobs:
python -m pip install pylint
python -m pip install unittest2
python -m pip install pytest
# TODO: remove version limitation when cppcheck-htmlreport is adjusted
python -m pip install pygments==2.11.2
python -m pip install pygments
python -m pip install requests
python -m pip install psutil

Expand Down
4 changes: 2 additions & 2 deletions htmlreport/cppcheck-htmlreport
Expand Up @@ -518,9 +518,9 @@ def to_css_selector(tag):
class AnnotateCodeFormatter(HtmlFormatter):
errors = []

def wrap(self, source, outfile):
def wrap(self, *args, **kwargs):
line_no = 1
for i, t in HtmlFormatter.wrap(self, source, outfile):
for i, t in HtmlFormatter.wrap(self, *args, **kwargs):
# If this is a source code line we want to add a span tag at the
# end.
if i == 1:
Expand Down