From 2b3e4a833ade16db2e5a8dd05391f37a2ed5de70 Mon Sep 17 00:00:00 2001 From: RJ Ascani Date: Fri, 29 May 2026 16:50:31 -0700 Subject: [PATCH] Suppress cppcheck unusedFunction false positives in headers cppcheck's unusedFunction is a whole-program check, but lintrunner analyzes files individually. Functions defined in headers are used by the .cpp files that include them, but cppcheck only sees the header in isolation and falsely reports them as never used. Suppress the check for .h/.hpp files while keeping it active for .cpp. Authored with assistance from Claude. --- .lintrunner.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.lintrunner.toml b/.lintrunner.toml index 02380ce1356..75608704110 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -134,6 +134,8 @@ command = [ '--extra-arg=--inconclusive', '--extra-arg=--suppress=unusedStructMember', '--extra-arg=--suppress=toomanyconfigs', + '--extra-arg=--suppress=unusedFunction:*.h', + '--extra-arg=--suppress=unusedFunction:*.hpp', '--', '@{{PATHSFILE}}' ]