Skip to content

Switch CPPCHECK to broad coverage with excludes#19909

Open
perheld wants to merge 6 commits into
pytorch:mainfrom
perheld:change-1268873
Open

Switch CPPCHECK to broad coverage with excludes#19909
perheld wants to merge 6 commits into
pytorch:mainfrom
perheld:change-1268873

Conversation

@perheld
Copy link
Copy Markdown
Collaborator

@perheld perheld commented Jun 1, 2026

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.

Change-Id: Id815fcbf7a6ba901b6d1b1ace4209ff157a15d7e

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

Copilot AI review requested due to automatic review settings June 1, 2026 06:21
@perheld perheld added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels Jun 1, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Jun 1, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19909

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 313 Pending

As of commit ef871de with merge base eeb0646 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the lintrunner CPPCHECK linter configuration to lint all C/C++ sources by default and rely on an explicit, commented exclude_patterns list to control scope (so newly added files are picked up unless explicitly excluded).

Changes:

  • Broadened CPPCHECK include_patterns from a few backend/example subtrees to **/*.cpp, **/*.h, **/*.hpp.
  • Added a large, categorized exclude_patterns list to keep cppcheck off vendored/generated areas and components not yet onboarded.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .lintrunner.toml
Copilot AI review requested due to automatic review settings June 1, 2026 06:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .lintrunner.toml
Comment thread .lintrunner.toml
Copilot AI review requested due to automatic review settings June 1, 2026 06:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .lintrunner.toml Outdated
@oscarandersson8218 oscarandersson8218 added the help wanted Extra attention is needed label Jun 1, 2026
Copilot AI review requested due to automatic review settings June 1, 2026 07:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .lintrunner.toml Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 08:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .lintrunner.toml Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 08:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

perheld and others added 2 commits June 1, 2026 20:44
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 <per.held@arm.com>
Change-Id: Id815fcbf7a6ba901b6d1b1ace4209ff157a15d7e
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
perheld and others added 4 commits June 1, 2026 20:44
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. help wanted Extra attention is needed partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants