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

feat(ci): Run a quicker clang-tidy for verification in the CI automatically #1026

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

whisperity
Copy link
Member

@whisperity whisperity commented Feb 10, 2023

Some checks are implemented in Clang-Tidy that can be used to verify style-like requirements that pure syntax-based systems, such as Clang-Format is not capable of.

Adds a new CI job using the CodeChecker action that runs only these verification checkers (and thus quicker than the full-blown static analysis workflow) and explicitly breaks the build if the style things do not match.

(Due to technical reasons with Clang-Tidy configuration, unfortunately, some minor duplication needs to be done between .clang-tidy and the CodeChecker config file.)

supersedes #963

@whisperity whisperity added enhancement New feature or request CI GitHub Actions & CI code health Code quality related topics. labels Feb 10, 2023
@whisperity
Copy link
Member Author

You can see an example execution of the "Checks" workflow here: https://github.com/whisperity/Contour/actions/runs/4145252988/jobs/7169368342

The ways of how it is triggered is a bit weird.

@christianparpart
Copy link
Member

@whisperity oopsi. there's a merce conflict in src/.clang-tidy :)

src/.clang-tidy Outdated
Comment on lines 81 to 82
# This is a *verification* check. The configuration **MUST** be kept in sync
# with .github/codechecker/config-verify.json
Copy link
Member

Choose a reason for hiding this comment

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

I am sure I can create a CI check that validates that both are in sync. once this one is merged, i can take care of that (I did it for a few other things already, too. :) )

Copy link
Member

@christianparpart christianparpart left a comment

Choose a reason for hiding this comment

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

I've added src/contour/ to the skipfile.txt until the QML branch (#761) is merged.

-*/_deps/sources/termbench-pro-*/*
-*/_deps/sources/*
-*/_deps/*
-*/src/contour/*
Copy link
Member Author

Choose a reason for hiding this comment

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

This effectively disables static analysis for the project as a whole, no?

whisperity and others added 4 commits August 20, 2023 14:44
Signed-off-by: Christian Parpart <christian@parpart.family>
… branch is merged.

Signed-off-by: Christian Parpart <christian@parpart.family>
Signed-off-by: Christian Parpart <christian@parpart.family>
@christianparpart christianparpart marked this pull request as draft August 21, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI GitHub Actions & CI code health Code quality related topics. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants