Skip to content

Add cppcheck and clang-tidy static analysis to CI/CD#62

Merged
97gamjak merged 22 commits intodevfrom
copilot/add-cpp-check-clang-ci
Dec 20, 2025
Merged

Add cppcheck and clang-tidy static analysis to CI/CD#62
97gamjak merged 22 commits intodevfrom
copilot/add-cpp-check-clang-ci

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 2, 2025

Adds static analysis workflow for C++ code in include/ and test/ directories using cppcheck and clang-tidy with all rules enabled.

Changes

  • New workflow .github/workflows/static-analysis.yml:
    • cppcheck job: Runs with --enable=all, uses existing .cppcheck.suppress, fails on errors
    • clang-tidy job: Generates compile_commands.json via CMake, analyzes headers and test files, uses existing .clang-tidy config
    • Triggers on PRs to any branch and manual dispatch
    • Explicit permissions: contents: read for least-privilege

Both jobs run in parallel on Ubuntu 24.04.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>MSTD-19: add cpp-check and clang in ci/cd</issue_title>
<issue_description>Created from Jira:

---</issue_description>

<agent_instructions>This should be implemented for include and test directories... So basically for all cpp related files and with all rules enabled for both programs</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 2, 2025 21:26
Co-authored-by: 97gamjak <77228802+97gamjak@users.noreply.github.com>
Co-authored-by: 97gamjak <77228802+97gamjak@users.noreply.github.com>
Co-authored-by: 97gamjak <77228802+97gamjak@users.noreply.github.com>
Copilot AI changed the title [WIP] Add cpp-check and clang to CI/CD pipeline Add cppcheck and clang-tidy static analysis to CI/CD Dec 2, 2025
Copilot AI requested a review from 97gamjak December 2, 2025 21:29
97gamjak and others added 18 commits December 7, 2025 22:34
- Updated cppcheck configuration to enable additional checks for performance, style, information, and portability.
- Refactored eval method in LiePotential class to use a protected _eval method for better encapsulation.
- Added cppcheck suppression comments for syntax errors in enums.hpp.
- Introduced a new cppcheck.sh script for running cppcheck with the updated configuration.
fix: Enhance static analysis configuration and add cppcheck script
…antity.hpp with warnings for buggy code

- update test_cpow.cpp with GPL header
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…les-and-libraries' of github.com:97gamjak/mstd into feature/MSTD-65-create-buggy-static-asser-for-single-files-and-libraries
…tic-asser-for-single-files-and-libraries

feat: Add include guards to new compile.hpp; enhance error.hpp and qu…
@97gamjak 97gamjak marked this pull request as ready for review December 20, 2025 19:39
@97gamjak 97gamjak merged commit 1f7367b into dev Dec 20, 2025
11 checks passed
@97gamjak 97gamjak deleted the copilot/add-cpp-check-clang-ci branch December 20, 2025 19:39
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.

MSTD-19: add cpp-check and clang in ci/cd

2 participants