Skip to content

Commit 1388200

Browse files
committed
Extend CPPCHECK scope to kernel tests
Remove the broad kernels/test CPPCHECK exclusion and keep the remaining suppressions scoped to that tree. Kernel tests use fixture helpers, generated-style test data, and GTest macros that cppcheck cannot consistently resolve as direct use sites. Suppress those test-harness findings locally while keeping the rest of the CPPCHECK configuration active for kernels/test. Signed-off-by: Per Held <per.held@arm.com> Change-Id: I033afb7b59b961a99d6716ff3faa068a0eed2f6a
1 parent 0807724 commit 1388200

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.lintrunner.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ exclude_patterns = [
195195
# Kernel areas to onboard separately.
196196
'kernels/optimized/**',
197197
'kernels/portable/**',
198-
'kernels/test/**',
199198

200199
# Runtime areas to onboard incrementally.
201200
'runtime/backend/**',
@@ -234,6 +233,16 @@ command = [
234233
'--extra-arg=--suppress=unusedFunction:*kernels/quantized/*',
235234
'--extra-arg=--suppress=constParameterReference:*kernels/quantized/*',
236235
'--extra-arg=--suppress=suspiciousFloatingPointCast:*kernels/quantized/*',
236+
# Kernel tests use fixture helpers, generated-style test cases, and GTest
237+
# macros that cppcheck cannot consistently resolve as direct use sites.
238+
'--extra-arg=--suppress=unusedFunction:*kernels/test/*',
239+
'--extra-arg=--suppress=unreadVariable:*kernels/test/*',
240+
'--extra-arg=--suppress=unknownMacro:*kernels/test/*',
241+
'--extra-arg=--suppress=syntaxError:*kernels/test/*',
242+
'--extra-arg=--suppress=passedByValue:*kernels/test/*',
243+
'--extra-arg=--suppress=duplicateBranch:*kernels/test/*',
244+
'--extra-arg=--suppress=useStlAlgorithm:*kernels/test/*',
245+
'--extra-arg=--suppress=functionStatic:*kernels/test/*',
237246
'--',
238247
'@{{PATHSFILE}}'
239248
]

0 commit comments

Comments
 (0)