Skip to content

Add GCC, Clang and clang-tidy CI gates - #107

Merged
michalpelka merged 1 commit into
JanuszBedkowski:mainfrom
dlubom:codex/cpp-ci-quality-gates-upstream
Dec 4, 2026
Merged

michalpelka merged 1 commit into
JanuszBedkowski:mainfrom
dlubom:codex/cpp-ci-quality-gates-upstream

Conversation

@dlubom

@dlubom dlubom commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Debian Bookworm x64
├─ GCC   → RPi 5 and Direct CM5
└─ Clang → RPi 5 and Direct CM5, with clang-tidy
  • Run the four builds independently with libcamera disabled.
  • Make format, array-bounds, return-type and compiler-specific function-address diagnostics fatal on project C++ targets. Enable seven clang-tidy checks covering issues such as integer division, use after move and memory ownership. Keep warnings visible in the vendored Livox SDK while disabling its blanket -Werror in strict Clang builds.
  • Fix diagnostics in the LED demo, GPIO callback capture, GNSS atomic counter and LAZ point-count output.

Evidence

  • The strict builds exposed a missing function call, a C++17 capture issue, an invalid atomic type and a mismatched format specifier. The fixes let all four builds and the format check pass. This PR carries the same file changes as the tested fork commit. Fork PR #10 checks
  • Both compilers rejected an out-of-range array index and accepted the last valid element in a boundary check. The Clang checks also caught integer division in a floating-point calculation, use after delete, leaked new and leaked malloc. Integer-division check · Memory and bounds build matrix

Merge impact

Reversible CI changes and four small source fixes. Strict mode is opt-in for local builds.

Make level-two format diagnostics fatal, flag integer division in
floating-point calculations, and check memory ownership and array bounds
in strict builds.
@dlubom

dlubom commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

@michalpelka hard gates for cheating agents :) + some fixes.

@michalpelka
michalpelka merged commit 10be275 into JanuszBedkowski:main Dec 4, 2026
5 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