Idea is to reduce the annoyances and research which clang-tidy rules make sense and actually have benefits in our project.
Also considering immediately resolving most if not all tidy warnings.
Current Changes
.clang-tidy has changes to follow the guidelines we have been following silently. Some rules were different from how we program.
Note that naming is completely removed and won't be checked. In a future PR (where we go over the code to fix linting issues), we can reintroduce them and make sure they fit our codebase consistently.
tidy rules are not considered errors anymore (stopped compile).
CI/CD addition to build check and clang-tidy check. Tried to get clang-tidy check to show when failed, but that causes complications in its checks; so now it is simply silent when failing.
Dockerfile that creates an arch container as cache for the CI/CD, prevents redownload of dependencies each run. Instead, it runs weekly (or optionally a different interval).
Current complications
To push the docker container build, it would require this webserver to allow larger filesize pushes (need ~2GB). Current workaround is arguably better where docker build is pushed to runner server.
Figuring out which clang-tidy rules make sense.
### Goal
Idea is to reduce the annoyances and research which clang-tidy rules make sense and actually have benefits in our project.
Also considering immediately resolving most if not all tidy warnings.
### Current Changes
- `.clang-tidy` has changes to follow the guidelines we have been following silently. Some rules were different from how we program.
- Note that naming is completely removed and won't be checked. In a future PR (where we go over the code to fix linting issues), we can reintroduce them and make sure they fit our codebase consistently.
- tidy rules are not considered errors anymore (stopped compile).
- CI/CD addition to build check and clang-tidy check. Tried to get clang-tidy check to show when failed, but that causes complications in its checks; so now it is simply silent when failing.
- Dockerfile that creates an arch container as cache for the CI/CD, prevents redownload of dependencies each run. Instead, it runs weekly (or optionally a different interval).
### Current complications
- To push the docker container build, it would require this webserver to allow larger filesize pushes (need ~2GB). Current workaround is arguably better where docker build is pushed to runner server.
- Figuring out which clang-tidy rules make sense.
@zach Many of the tidy rules are removed and they are not considered errors anymore. I will research further some other day (perhaps when skimming the current tidy warnings in the workflow step) to see if there is any value in the current rules. We can discuss further, but feel free to check the changes so far.
@zach Many of the tidy rules are removed and they are not considered errors anymore. I will research further some other day (perhaps when skimming the current tidy warnings in the workflow step) to see if there is any value in the current rules. We can discuss further, but feel free to check the changes so far.
AramJonghu
changed title from WIP: update to clang-tidy to WIP: update to clang-tidy + workflow improvement cpp build & lint check2026-06-29 01:51:32 +02:00
This looks good so far. I don't have much of a problem with them if they're not considered errors. Is there a way to make certain diagnostics Info/Help and some Warnings? Maybe keep the diagnostics that lead to bad/buggy code as warnings, then make everything else Info/Help diagnostics.
This looks good so far. I don't have much of a problem with them if they're not considered errors. Is there a way to make certain diagnostics Info/Help and some Warnings? Maybe keep the diagnostics that lead to bad/buggy code as warnings, then make everything else Info/Help diagnostics.
Certainly possible. Previous implementation was just a wildcard (so all diagnostics were considered errors). We can pick which diagnostics we want as errors, warnings, or info/help.
Certainly possible. Previous implementation was just a wildcard (so all diagnostics were considered errors). We can pick which diagnostics we want as errors, warnings, or info/help.
I think for consistency and readibility of PRs reasons, I should reserve fixing clang-tidy (and format) cpp/hpp files for a different PR. That would muddy this PR and add noise.
On further search; we cannot decide which become info and which become warnings. Only which ones get considered as errors. I suggest keeping as is.
I think for consistency and readibility of PRs reasons, I should reserve fixing clang-tidy (and format) cpp/hpp files for a different PR. That would muddy this PR and add noise.
On further search; we cannot decide which become info and which become warnings. Only which ones get considered as errors. I suggest keeping as is.
AramJonghu
marked the pull request as ready for review 2026-06-29 20:29:15 +02:00
AramJonghu
requested review from zach 2026-06-29 20:29:27 +02:00
Consider a squash commit since there is a lot of noise with all the commits. A single squash commit would reduce the many commit messages with a single more informative commit message.
Consider a squash commit since there is a lot of noise with all the commits. A single squash commit would reduce the many commit messages with a single more informative commit message.
zach
merged commit bc9d8af0fe into main2026-06-29 22:10:27 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Idea is to reduce the annoyances and research which clang-tidy rules make sense and actually have benefits in our project.
Also considering immediately resolving most if not all tidy warnings.
Current Changes
.clang-tidyhas changes to follow the guidelines we have been following silently. Some rules were different from how we program.Current complications
Current workaround is to push the Dockerfile build to my instance instead; generally better since all runners run on this server anyway.
@zach Many of the tidy rules are removed and they are not considered errors anymore. I will research further some other day (perhaps when skimming the current tidy warnings in the workflow step) to see if there is any value in the current rules. We can discuss further, but feel free to check the changes so far.
WIP: update to clang-tidyto WIP: update to clang-tidy + workflow improvement cpp build & lint checkThis looks good so far. I don't have much of a problem with them if they're not considered errors. Is there a way to make certain diagnostics Info/Help and some Warnings? Maybe keep the diagnostics that lead to bad/buggy code as warnings, then make everything else Info/Help diagnostics.
Certainly possible. Previous implementation was just a wildcard (so all diagnostics were considered errors). We can pick which diagnostics we want as errors, warnings, or info/help.
I think for consistency and readibility of PRs reasons, I should reserve fixing clang-tidy (and format) cpp/hpp files for a different PR. That would muddy this PR and add noise.
On further search; we cannot decide which become info and which become warnings. Only which ones get considered as errors. I suggest keeping as is.
Consider a squash commit since there is a lot of noise with all the commits. A single squash commit would reduce the many commit messages with a single more informative commit message.