From d9a91e5d7463b2416a070871c55bb179077672b7 Mon Sep 17 00:00:00 2001 From: Per Held Date: Thu, 28 May 2026 14:13:30 +0200 Subject: [PATCH 1/6] Switch CPPCHECK to broad coverage with excludes Switch lintrunner cppcheck include pattern to include all files and rely on the exclude pattern to not lint files. This has the positive side effect that new files would be included in the linting and the exclude list can have a nice sorting and comments why things have ended up there. The end goal should of course be a empty exclude_patterns list. Signed-off-by: Per Held Change-Id: Id815fcbf7a6ba901b6d1b1ace4209ff157a15d7e --- .lintrunner.toml | 106 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 98 insertions(+), 8 deletions(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index 75608704110..d21d7ec468d 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -109,16 +109,106 @@ is_formatter = true [[linter]] code = 'CPPCHECK' include_patterns = [ - 'backends/arm/**/*.cpp', - 'backends/arm/**/*.h', - 'backends/arm/**/*.hpp', - 'backends/cortex_m/**/*.cpp', - 'backends/cortex_m/**/*.h', - 'examples/arm/**/*.cpp', - 'examples/arm/**/*.h', - 'examples/arm/**/*.hpp', + '**/*.cpp', + '**/*.h', + '**/*.hpp', ] exclude_patterns = [ + # Third-party and vendored code. + '**/third-party/**', + '**/third_party/**', + 'third-party/**', + 'third_party/**', + + # PyTorch compatibility code kept in sync with upstream. + 'runtime/core/portable_type/c10/**', + + # Generated and template-only sources. + 'codegen/templates/**', + 'codegen/tools/selective_build.cpp', + 'exir/_serialize/**', + + # Backend-owned code to onboard separately. + 'backends/aoti/**', + 'backends/apple/**', + 'backends/cadence/**', + 'backends/cuda/**', + 'backends/mediatek/**', + 'backends/mlx/**', + 'backends/nxp/**', + 'backends/openvino/**', + 'backends/qualcomm/**', + 'backends/samsung/**', + 'backends/test/**', + 'backends/vulkan/**', + 'backends/webgpu/**', + 'backends/xnnpack/**', + + # Backend-owned examples to onboard with those backends. + 'examples/demo-apps/**', + 'examples/mediatek/**', + 'examples/nxp/**', + 'examples/qualcomm/**', + 'examples/samsung/**', + + # Other examples to onboard separately. + 'examples/devtools/**', + 'examples/llm_manual/**', + 'examples/models/**', + 'examples/portable/**', + 'examples/raspberry_pi/**', + + # EXIR and devtools areas to onboard separately. + 'devtools/bundled_program/**', + 'devtools/etdump/**', + 'exir/backend/test/**', + 'exir/tests/**', + 'exir/verification/**', + + # Extension areas to onboard incrementally. + 'extension/android/**', + 'extension/apple/**', + 'extension/asr/runner/transducer_runner.h', + 'extension/aten_util/**', + 'extension/benchmark/apple/**', + 'extension/data_loader/**', + 'extension/evalue_util/**', + 'extension/flat_tensor/**', + 'extension/kernel_util/make_boxed_from_unboxed_functor.h', + 'extension/kernel_util/test/**', + 'extension/llm/**', + 'extension/llm/apple/**', + 'extension/llm/custom_ops/spinquant/third-party/**', + 'extension/memory_allocator/**', + 'extension/module/**', + 'extension/named_data_map/**', + 'extension/pybindings/**', + 'extension/pytree/**', + 'extension/runner_util/**', + 'extension/tensor/**', + 'extension/testing_util/**', + 'extension/threadpool/**', + 'extension/training/**', + 'extension/wasm/**', + + # Kernel areas to onboard separately. + 'kernels/aten/**', + 'kernels/optimized/**', + 'kernels/portable/**', + 'kernels/prim_ops/**', + 'kernels/quantized/**', + 'kernels/test/**', + + # Runtime areas to onboard incrementally. + 'runtime/backend/**', + 'runtime/core/**', + 'runtime/executor/**', + 'runtime/kernel/**', + 'runtime/platform/**', + + # Top-level test and platform integration areas. + 'test/**', + 'zephyr/**', ] command = [ 'python', From a85cb7a6a238308576684b7209a7230479688ee8 Mon Sep 17 00:00:00 2001 From: Per Held Date: Mon, 1 Jun 2026 08:30:12 +0200 Subject: [PATCH 2/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .lintrunner.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.lintrunner.toml b/.lintrunner.toml index d21d7ec468d..76341fe07e1 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -120,6 +120,8 @@ exclude_patterns = [ 'third-party/**', 'third_party/**', + # Mirrored sources under src/ (Python package layout). Prefer linting canonical paths. + 'src/executorch/**', # PyTorch compatibility code kept in sync with upstream. 'runtime/core/portable_type/c10/**', From c1fd25255352d4c4268e8013fc09e18cfb924edb Mon Sep 17 00:00:00 2001 From: Per Held Date: Mon, 1 Jun 2026 08:38:30 +0200 Subject: [PATCH 3/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .lintrunner.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index 76341fe07e1..00d26631e0c 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -179,8 +179,6 @@ exclude_patterns = [ 'extension/kernel_util/make_boxed_from_unboxed_functor.h', 'extension/kernel_util/test/**', 'extension/llm/**', - 'extension/llm/apple/**', - 'extension/llm/custom_ops/spinquant/third-party/**', 'extension/memory_allocator/**', 'extension/module/**', 'extension/named_data_map/**', From 97e64ad91fa67fe9a2d51637f663dc7f2c9aabc7 Mon Sep 17 00:00:00 2001 From: Per Held Date: Mon, 1 Jun 2026 09:52:52 +0200 Subject: [PATCH 4/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .lintrunner.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index 00d26631e0c..f114d2df311 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -115,10 +115,10 @@ include_patterns = [ ] exclude_patterns = [ # Third-party and vendored code. - '**/third-party/**', - '**/third_party/**', 'third-party/**', 'third_party/**', + '**/third-party/**', + '**/third_party/**' # Mirrored sources under src/ (Python package layout). Prefer linting canonical paths. 'src/executorch/**', From ce45b54484ade7446c6091a7b86c65ba2fff7dd9 Mon Sep 17 00:00:00 2001 From: Per Held Date: Mon, 1 Jun 2026 10:01:54 +0200 Subject: [PATCH 5/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .lintrunner.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index f114d2df311..4f2b59f1aa0 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -118,7 +118,7 @@ exclude_patterns = [ 'third-party/**', 'third_party/**', '**/third-party/**', - '**/third_party/**' + '**/third_party/**', # Mirrored sources under src/ (Python package layout). Prefer linting canonical paths. 'src/executorch/**', From ef871de7b03892717f4a13259d77680324f73dcb Mon Sep 17 00:00:00 2001 From: Per Held Date: Mon, 1 Jun 2026 10:21:19 +0200 Subject: [PATCH 6/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .lintrunner.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index 4f2b59f1aa0..4289239e46c 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -125,7 +125,7 @@ exclude_patterns = [ # PyTorch compatibility code kept in sync with upstream. 'runtime/core/portable_type/c10/**', - # Generated and template-only sources. + # Generated sources, templates, and codegen tooling to onboard separately. 'codegen/templates/**', 'codegen/tools/selective_build.cpp', 'exir/_serialize/**',