ci+docs: CONTRIBUTING.md + clang-tidy workflow + .clang-tidy config - #2418
Open
ronaldtse wants to merge 2 commits into
Open
ci+docs: CONTRIBUTING.md + clang-tidy workflow + .clang-tidy config#2418ronaldtse wants to merge 2 commits into
ronaldtse wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2418 +/- ##
==========================================
- Coverage 85.36% 85.36% -0.01%
==========================================
Files 126 126
Lines 22861 22866 +5
==========================================
+ Hits 19516 19520 +4
- Misses 3345 3346 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds two pieces of project infrastructure that close long-standing gaps: * CONTRIBUTING.md (closes #1189 partially — CoC already existed at docs/code-of-conduct.adoc, but no CONTRIBUTING guide). Covers the practical bits contributors actually need: how to build/test locally, code style, commit conventions, PR checklist, the crypto-path test discipline, and how to add a new FFI function or CMake option. * .clang-tidy + .github/workflows/clang-tidy.yml (closes #2317). clang-tidy CI runs on push and PRs, on clang-18 + both backends. Configuration starts permissive (only a curated set of high-confidence checks; no WarningsAsErrors yet). The workflow captures findings to the GitHub Step Summary and uploads the full log as a 14-day artifact so reviewers can see the noise without the build gating on it. The .clang-tidy check set covers: bugprone-* (assertion side effects, dangling handles, use-after-move, swapped args, etc.), cert-* (the sub-set that's not noisy on C++17), performance-* (move-const-arg, unnecessary copies), modernize-* (loop-convert, override, nullptr), and readability-* (cognitive complexity threshold 30, braces, etc.). Modernize and performance checks will produce the most churn on first run; that's expected — the follow-up work is to triage and fix incrementally, then flip WarningsAsErrors on per category. TODO.rnp-roadmap/16-code-of-conduct.md and /20-static-analysis.md track the broader scope.
…ng log - Switch from ubuntu:24.04 to ghcr.io/rnpgp/ci-rnp-debian-sid-amd64 container, which has libbotan-3-dev available (Ubuntu 24.04's default repos don't ship it). - Guard the Summarise step against missing clang-tidy.log so a failed Configure/Build doesn't cascade into a Summarise failure. Also fix typo in CONTRIBUTING.md caught by `typos`: LICENSE.LESSer -> LICENSE.LESSER.
ronaldtse
force-pushed
the
coc-and-clang-tidy
branch
from
August 9, 2026 23:06
a535ee7 to
eeecc7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1189 (Code of Conduct + community guidelines) and #2317 (Investigate GitHub Action static analysis tool).
CONTRIBUTING.md
The CoC already exists at
docs/code-of-conduct.adoc(linked from README), but there was noCONTRIBUTING.md. This PR adds one covering the practical bits contributors actually need:.clang-formatis the source of truth).clang-tidy CI workflow +
.clang-tidyconfig.github/workflows/clang-tidy.yml: runs on push + PR, onclang-18with both Botan and OpenSSL backends. Builds withCMAKE_CXX_CLANG_TIDYso clang-tidy runs per translation unit. Captures findings to the GitHub Step Summary (top-10 check categories) and uploads the full log as a 14-day artifact..clang-tidy: starts permissive — only a curated set of high-confidence checks (bugprone, cert subset, performance, modernize, readability).WarningsAsErrorsis not enabled initially; the existing codebase has too many findings to flip the gate on all at once. The plan is to tighten incrementally per TODO.rnp-roadmap/20-static-analysis.md.Test plan
Out of scope (follow-up)
.clang-tidycheck set after triaging initial findings.WarningsAsErrors: '*'once clean.coverity.ymldaily scan; could add PR-time gating once a baseline is established).good first issuelabels to small starter bugs (mentioned in TODO.rnp-roadmap/16).Closes #1189.
Closes #2317.