Skip to content

Add Clang analysis stage to CI and implement analysis script#105

Merged
luismiguensfernandez merged 2 commits intomasterfrom
feature/clang-static-analysis
Mar 20, 2026
Merged

Add Clang analysis stage to CI and implement analysis script#105
luismiguensfernandez merged 2 commits intomasterfrom
feature/clang-static-analysis

Conversation

@luismiguensfernandez
Copy link
Copy Markdown
Member

  • Introduced a new CI stage for running Clang analysis on Linux.
  • Added a script for performing Clang static analysis and clang-tidy checks.
  • Updated CanDeviceConfiguration to maintain consistency in string conversion.

- Introduced a new CI stage for running Clang analysis on Linux.
- Added a script for performing Clang static analysis and clang-tidy checks.
- Updated CanDeviceConfiguration to maintain consistency in string conversion.
@luismiguensfernandez luismiguensfernandez marked this pull request as ready for review March 19, 2026 14:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Linux CI job to run Clang Static Analyzer and clang-tidy, alongside a small update to CanDeviceConfiguration::to_string() to keep field handling consistent.

Changes:

  • Added a GitLab CI job to run Clang analysis on Linux.
  • Introduced ci/run-clang-analysis-linux.sh to configure/build with Clang, run scan-build, and run clang-tidy.
  • Updated CanDeviceConfiguration::to_string() to set first = false consistently for the last optional field (with a linter suppression comment).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/main/CanDeviceConfiguration.cpp Adds a NOLINT-annotated assignment for consistency in string formatting logic.
ci/run-clang-analysis-linux.sh New analysis script orchestrating CMake build, scan-build reporting, and clang-tidy.
ci/gitlab/normal.yml Adds a Linux CI job that installs Clang tooling and runs the analysis script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@luismiguensfernandez luismiguensfernandez merged commit a5db91c into master Mar 20, 2026
13 checks passed
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.

2 participants