Skip to content

Add C/C++ support for safe first-pass rules - #26

Merged
gdevillele merged 2 commits into
mainfrom
feature/cpp-support
Aug 2, 2026
Merged

Add C/C++ support for safe first-pass rules#26
gdevillele merged 2 commits into
mainfrom
feature/cpp-support

Conversation

@gdevillele

Copy link
Copy Markdown
Owner

Summary

  • Add cpp to the shared rule contract with compatibility and implementation status for every rule.
  • Ship a Go-hosted C/C++ runner under implementations/cpp that enforces VET002–VET005, VET008–VET009, and VET014.
  • Leave function-shape and casing rules (VET001, VET006–VET007, VET010–VET013) as planned until a reliable C/C++ syntax model is available.
  • Add unit tests, conformance fixtures, and architecture/README notes explaining why the C/C++ runner is not written in C/C++.

Test plan

  • go test ./implementations/cpp/...
  • go test ./implementations/go/...
  • Manual checks against spec/conformance/{indent,source-file-header,source-file-lines}/cpp
  • CI green on this PR

Introduce a Go-hosted cpp implementation that enforces header, file length,
indentation, and GitHub Actions pinning without relying on brittle C/C++
function parsing. Mark function-shape and casing rules as planned, and add
conformance fixtures plus unit tests.
Treat VET001/006/007/010–013 as implementation:unimplemented for cpp
(not planned), reject those CLI flags, warn on config non-defaults, and
document the subset runner. Harden the line scanner for BOM and raw-string
boundaries so the simple rule set stays trustworthy.

@aduermael aduermael left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gdevillele
gdevillele merged commit b774006 into main Aug 2, 2026
1 check passed
@gdevillele
gdevillele deleted the feature/cpp-support branch August 2, 2026 02:06
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