update to clang-tidy + workflow improvement cpp build & lint check #130

Merged
zach merged 14 commits from clang-tidy-fixes into main 2026-06-29 22:10:27 +02:00
Collaborator

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.
### 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.
AramJonghu added the enhancement label 2026-06-29 00:08:05 +02:00
AramJonghu self-assigned this 2026-06-29 00:08:05 +02:00
AramJonghu added 2 commits 2026-06-29 00:08:05 +02:00
CI/CD for build test; includes dockerbuild to avoid docker redownloading deps. avoid-c-arrays removed
Build (C++) / build (pull_request) Failing after 1s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 11s
Python / lint-format (pull_request) Successful in 17s
Python / test (pull_request) Successful in 31s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m7s
4061cc60a3
AramJonghu added 1 commit 2026-06-29 00:24:09 +02:00
ci: adjust link of dockerfile build origin
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 19s
Python / test (pull_request) Successful in 35s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m9s
Build (C++) / build (pull_request) Failing after 5s
d82b6da074
Author
Collaborator

Current workaround is to push the Dockerfile build to my instance instead; generally better since all runners run on this server anyway.

Current workaround is to push the Dockerfile build to my instance instead; generally better since all runners run on this server anyway.
AramJonghu added 1 commit 2026-06-29 00:45:51 +02:00
adjusted CMake file to not require Cava
Build (C++) / build (pull_request) Failing after 4s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 17s
Python / lint-format (pull_request) Successful in 22s
Python / test (pull_request) Successful in 34s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m12s
1ac8162c30
AramJonghu added 1 commit 2026-06-29 00:49:28 +02:00
undo of cmakelist changes, using AUR instead to resolve cava build requirement
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 15s
Python / lint-format (pull_request) Successful in 26s
Python / test (pull_request) Successful in 35s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m18s
Build (C++) / build (pull_request) Has been cancelled
60b0844b7f
AramJonghu added 1 commit 2026-06-29 00:59:25 +02:00
resolve clang-tidy step workflow
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 20s
Python / lint-format (pull_request) Successful in 31s
Python / test (pull_request) Successful in 50s
Build (C++) / build (pull_request) Successful in 56s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m14s
94100b6e2f
AramJonghu added 1 commit 2026-06-29 01:03:16 +02:00
separate workflows; build and lint clangtidy
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 22s
Python / lint-format (pull_request) Successful in 29s
Python / test (pull_request) Successful in 1m0s
Build (C++) / build (pull_request) Successful in 1m52s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m49s
Lint (C++) / lint (pull_request) Successful in 2m5s
55b73eea19
AramJonghu added 1 commit 2026-06-29 01:07:14 +02:00
in warnings will show job failed
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 23s
Python / lint-format (pull_request) Successful in 29s
Python / test (pull_request) Successful in 58s
Build (C++) / build (pull_request) Successful in 1m48s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m48s
Lint (C++) / lint (pull_request) Failing after 2m2s
2e2747ac04
AramJonghu added 1 commit 2026-06-29 01:15:05 +02:00
slight revert into single workflow for missing tidy check reason
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 34s
Python / test (pull_request) Successful in 51s
C++ / build (pull_request) Failing after 1m5s
C++ / lint (pull_request) Has been skipped
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m18s
7448fc101d
AramJonghu added 1 commit 2026-06-29 01:19:42 +02:00
revert; clang-tidy does on same workflow, but nonblocking
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 19s
Python / lint-format (pull_request) Successful in 28s
Python / test (pull_request) Successful in 51s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m44s
C++ / build (pull_request) Successful in 2m15s
afd08e8aa7
AramJonghu added 1 commit 2026-06-29 01:25:33 +02:00
clang-tidy: drop noisy checks, keep high-value only
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 19s
Python / lint-format (pull_request) Successful in 29s
Python / test (pull_request) Successful in 1m1s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m44s
C++ / build (pull_request) Successful in 2m11s
a3ca37b51a
AramJonghu added 1 commit 2026-06-29 01:30:39 +02:00
clang-tidy: disable 3 noisy bugprone checks
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 20s
Python / lint-format (pull_request) Successful in 29s
Python / test (pull_request) Successful in 45s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m45s
C++ / build (pull_request) Successful in 2m9s
49010e2a43
Author
Collaborator

@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 check 2026-06-29 01:51:32 +02:00
Owner

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.
Author
Collaborator

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.
AramJonghu added 1 commit 2026-06-29 19:49:03 +02:00
Merge branch 'main' into clang-tidy-fixes
C++ / build (pull_request) Failing after 4s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 11s
Python / lint-format (pull_request) Successful in 18s
Python / test (pull_request) Successful in 31s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m13s
25c9979674
AramJonghu added 1 commit 2026-06-29 19:56:36 +02:00
adusted workflow to fit new cmakelists
Python / lint-format (pull_request) Successful in 28s
Python / test (pull_request) Successful in 56s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m40s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 9s
C++ / build (pull_request) Successful in 1m51s
50e179e0fe
Author
Collaborator

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
Author
Collaborator

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 main 2026-06-29 22:10:27 +02:00
Sign in to join this conversation.