Skip to content

clang-tidy: Enforcement vs. suggestions #3243

@Lestropie

Description

@Lestropie

In #3212 (and imminent follow-up), an increased number of C++ code quality checks are introduced.
While some of these may remain best enforced using the check_syntax mass-grep approach, others are likely more suitable to be assessed using clang-tidy, for multiple reasons:

  • More robust classification than my regex skills
  • More computationally efficient as checks can be run exclusively on a PR's diff

However as discussed in #2745, turning all clang-tidy checks into outright enforcement might both require too much upfront effort to conform the repo initially and be too restrictive on changes.

What might work instead is a two-level process:

  • One Action performs clang-tidy with a restricted set of checks, based on those that are reasonably easy to refactor / have already been mass refactored and we wish to preserve enforcement / are unambiguously positives.
  • A second Action preserves that currently in use, which only posts recommendations to the PR but with a more exhaustive set of checks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions