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

Set up clang-tidy in CI #2971

Open
danobi opened this issue Jan 30, 2024 · 2 comments · May be fixed by #2973
Open

Set up clang-tidy in CI #2971

danobi opened this issue Jan 30, 2024 · 2 comments · May be fixed by #2973
Assignees
Labels
ci Issues or PRs related to Github Actions CI difficulty: medium enhancement New feature or request, changes on existing features

Comments

@danobi
Copy link
Member

danobi commented Jan 30, 2024

clang-tidy seems like a useful linter. C++ could really use all the linters it can get.

https://github.com/marketplace/actions/clang-tidy-review looks useful but it might
be nice to be able to run clang-tidy locally as well thru nix. Perhaps this action
is better for that: https://github.com/marketplace/actions/clang-tidy-action . ie.
run clang-tidy thru nix, get the output file, then use the action to post inline comments
on the PR.

Would also be nice to only clang-tidy on changed lines, much like git-clang-format.

@danobi danobi added enhancement New feature or request, changes on existing features ci Issues or PRs related to Github Actions CI difficulty: medium labels Jan 30, 2024
danobi added a commit to danobi/bpftrace that referenced this issue Jan 30, 2024
Experimental job to enable clang-tidy. This action should only run
against the changes made in the PR.

This closes bpftrace#2971.
@danobi danobi linked a pull request Jan 30, 2024 that will close this issue
3 tasks
danobi added a commit to danobi/bpftrace that referenced this issue Jan 30, 2024
Experimental job to enable clang-tidy. This action should only run
against the changes made in the PR.

This closes bpftrace#2971.
danobi added a commit to danobi/bpftrace that referenced this issue Jan 30, 2024
Experimental job to enable clang-tidy. This action should only run
against the changes made in the PR.

This closes bpftrace#2971.
@jordalgo
Copy link
Contributor

+100 to more linting

danobi added a commit to danobi/bpftrace that referenced this issue Feb 10, 2024
This job runs clang tidy against the working directory.

This closes bpftrace#2971.
danobi added a commit to danobi/bpftrace that referenced this issue Feb 10, 2024
This job runs clang tidy against the working directory.

This closes bpftrace#2971.
@danobi
Copy link
Member Author

danobi commented Feb 20, 2024

Followup: try to detect opportunities to use structured binding: https://en.cppreference.com/w/cpp/language/structured_binding

see: #2988 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues or PRs related to Github Actions CI difficulty: medium enhancement New feature or request, changes on existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants