You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exclude C and C++ test and benchmark files by default #2079
default_exclude_patterns.json has default test-path exclusions for Go, Java, Kotlin, Python, Rust, Swift, Haskell, Zig and others, but none for C or C++. GoogleTest files (*_test.cc), Chromium-style unit tests (*_unittest.cc), Google Benchmark files (*_benchmark.cc), and the test/, tests/, unittests/ and benchmarks/ trees used by CTest, Catch2 and LLVM are all sent to the reviewer and checked against c.md and cpp.md.
Proposed Solution
Add C/C++ patterns in the style of the Rust change in #1971:
Keep names such as contest.cc, test_support.h, src/benchmark.cc and src/testing/harness.cc reviewable, and keep the directory patterns extension-scoped so CUDA/HIP kernels under tests/ stay reviewable.
Alternatives Considered
A test_* prefix pattern (Unity/CMocka) was left out: it would also hide helpers such as test_support.cc, and those test files usually sit under test/ already. Users can already add excludes in .opencodereview/rule.json, but every C/C++ user has to discover and repeat that.
Activity