Add Clang Static Analyzer integration to CI/CD pipeline#5
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Add Clang Static Analyzer integration to CI/CD pipeline#5devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Create GitHub Actions workflow for Clang Static Analysis - Add rules/clang-sa.mk with ClangSA targets - Add ClangSA configuration options to rules/config - Workflow runs on pushes and PRs to master and year-based branches - Analysis reports uploaded as artifacts and commented on PRs Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
Add static analysis capabilities to the SONiC build system using Clang Static Analyzer (ClangSA) to help identify potential bugs, security issues, and code quality problems in C/C++ code.
Work item tracking
How I did it
Created a new GitHub Actions workflow (
.github/workflows/clang-static-analysis.yml) that:Added
rules/clang-sa.mkwith make targets for running scan-build on sonic-swss and sonic-utilitiesAdded configuration options to
rules/config:ENABLE_CLANG_SA- Enable/disable the analyzer (default: n)CLANG_SA_CHECKERS- Configurable checker listCLANG_SA_OUTPUT_DIR- Output directory for reportsHow to verify it
ENABLE_CLANG_SA=ymake clang-sato execute the static analyzertarget/clang-sa-reports/for HTML reportsHuman Review Checklist
src/sonic-swssandsrc/sonic-utilitiespaths are correct for scan-build targets|| trueerror suppression is appropriate or if failures should be surfacedWhich release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Add Clang Static Analyzer (ClangSA) integration to CI/CD pipeline for automated static analysis of C/C++ code.
Link to config_db schema for YANG module changes
N/A - No YANG model changes
A picture of a cute animal (not mandatory but encouraged)
🦔
Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/71aaeff310a84d788d782489c0df5b1a
Requested by: Arthur Poon (arthur.poon@cognition.ai) (@arthurkkp-cog)