diff --git a/.github/launch-lizard.py b/.github/launch-lizard.py index d5ce25e9b..0c1929042 100644 --- a/.github/launch-lizard.py +++ b/.github/launch-lizard.py @@ -5,7 +5,7 @@ i = lizard.analyze(files) -print(f"""Lizard report +print(f"""### Lizard report --- Listing only functions with cyclomatic complexity >= 15 or NLOC >= 100 or parameters >= 10. @@ -22,8 +22,9 @@ if func.cyclomatic_complexity >= 15 or func.nloc >= 100 or param_count >= 10: data.append([ - f"{filename} | {func.start_line}:{func.end_line} | `{func.name}` | {param_count} | {func.nloc}", func.cyclomatic_complexity + f"{filename} | {func.start_line}:{func.end_line} | `{func.name}` | {param_count} | {func.nloc}", + func.cyclomatic_complexity ]) for line in sorted(data, key=lambda e: e[1], reverse=True): - print(f"| {line[0]} | {line[1]} |") \ No newline at end of file + print(f"| {line[0]} | {line[1]} |") diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 5d7a86f22..17f17271f 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -44,7 +44,7 @@ jobs: with: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' - body-includes: Build output + body-includes: Static analysis report - name: Create or update comment uses: peter-evans/create-or-update-comment@v4 @@ -52,9 +52,10 @@ jobs: comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} body: | + ## Static analysis report ${{ steps.lizard.outputs.report }} --- - ## CppCheck report + ### CppCheck report ``` ${{ steps.cppcheck.outputs.report }} ```