Skip to content

Proposal: Add a pre-commit hook configuration #9103

@Scheremo

Description

@Scheremo

Hi everyone,

I’ve noticed that some of the .td (TableGen) files in the repository contain trailing whitespace and minor formatting inconsistencies. To help avoid these and others in the future, and to make contributor workflows a bit smoother, I’d like to propose adding a pre-commit configuration to the repo.

A pre-commit setup would:

  • Automatically strip trailing whitespace and fix end-of-file newlines
  • Enforce consistent formatting by using the same fixed clang-format version used in CI
  • Make it easier for contributors to catch common issues locally before committing

This would not affect build behavior and can be gradually adopted.
If people are open to the idea, I can open a PR with a minimal .pre-commit-config.yaml and documentation on how to enable it.

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions