psl can be used as a pre-commit hook to enforce structure and symbol-placement rules before every commit.

Setup

Add the following to your .pre-commit-config.yaml:

- repo: https://github.com/heumsi/python-structure-linter
  rev: ''  # Use the tag you want to point at (e.g., v0.1.0)
  hooks:
    - id: python-structure-linter

Custom Options

To pass custom options (e.g., a specific config file path), use args:

- repo: https://github.com/heumsi/python-structure-linter
  rev: ''
  hooks:
    - id: python-structure-linter
      args: [--config, custom-config.yaml]