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

ci: Add CodeChecker #836

Merged

Conversation

LukasWoodtli
Copy link
Contributor

No description provided.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@LukasWoodtli LukasWoodtli force-pushed the gardena/lw/codechecker branch 14 times, most recently from 2104d0c to dfb77f1 Compare December 3, 2024 14:20
@rettichschnidi
Copy link
Contributor

@LukasWoodtli
Copy link
Contributor Author

@LukasWoodtli LukasWoodtli force-pushed the gardena/lw/codechecker branch 2 times, most recently from 1a59e6f to 56a3853 Compare December 4, 2024 15:55
@LukasWoodtli LukasWoodtli marked this pull request as ready for review December 4, 2024 16:03
Copy link
Contributor

@rettichschnidi rettichschnidi left a comment

Choose a reason for hiding this comment

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

Initial, superfluous feedback. Will have a closer look once I get it to work on my machine.

run: |
sudo apt-get update
sudo apt-get install clang-tools-18 cmake cppcheck libcunit1-dev ninja-build
pip3 install codechecker
Copy link
Contributor

Choose a reason for hiding this comment

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

Would lock down all dependencies

Suggested change
pip3 install codechecker
pip install --require-hashes -r tools/requirements-ci.txt

Warning: CodeChecker has quite some dependencies, this will be a rabbit hole. But maybe you'll find good tooling for this work?

doc/code_checker.rst Outdated Show resolved Hide resolved
tools/ci/run_ci.sh Outdated Show resolved Hide resolved
Comment on lines 247 to 251
CodeChecker check --logfile build-wakaama/compile_commands.json \
--config "$config_file" \
--ignore "$ignore_file" \
--output $code_checker_result_dir \
|| true # Currently failing with found issues
Copy link
Contributor

Choose a reason for hiding this comment

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

Still needed? If it does, would improve the comment, explain a bit.

tools/ci/run_ci.sh Outdated Show resolved Hide resolved
tools/ci/run_ci.sh Outdated Show resolved Hide resolved
tools/ci/run_ci.sh Outdated Show resolved Hide resolved
tools/ci/run_ci.sh Outdated Show resolved Hide resolved
tools/code_checker/config.json Outdated Show resolved Hide resolved
doc/code_checker.rst Outdated Show resolved Hide resolved
@rettichschnidi rettichschnidi changed the title Gardena/lw/codechecker ci: Add CodeChecker Dec 5, 2024
@LukasWoodtli LukasWoodtli force-pushed the gardena/lw/codechecker branch 2 times, most recently from 9eee1a7 to 14dfba3 Compare December 9, 2024 10:55
doc/code_checker.rst Show resolved Hide resolved
tools/requirements-ci.txt Outdated Show resolved Hide resolved
CodeChecker combines multiple static code analysis tools including
`clang-sa`. It also provides the possibility to check against a baseline
to report only newly introduced issues.
Moreover it is simpler to use.
It could eventually replace `clang-sa` completely in the pipeline.
Static analysis is done with `CodeChecker` now. It integrates the clang
static analyzer and `cppcheck`.
@LukasWoodtli LukasWoodtli force-pushed the gardena/lw/codechecker branch from 14dfba3 to 3f1a5b9 Compare December 10, 2024 09:43
@LukasWoodtli LukasWoodtli merged commit c6092f1 into eclipse-wakaama:main Dec 10, 2024
37 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