Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add post-processing commands #3207

Open
benedikt-bartscher opened this issue Aug 4, 2024 · 1 comment
Open

Add post-processing commands #3207

benedikt-bartscher opened this issue Aug 4, 2024 · 1 comment
Labels
Feature New feature or request

Comments

@benedikt-bartscher
Copy link

Feature

I would love to see an option for the buf generator which adds custom post-processing commands.
For example running ruff after generating code with python-betterproto.

Slack ref: https://bufbuild.slack.com/archives/CRZ680FUH/p1722782692615029

@benedikt-bartscher benedikt-bartscher added the Feature New feature or request label Aug 4, 2024
@benedikt-bartscher
Copy link
Author

Commands could be specified per plugin. It should be possible to pass the out directory to the commands, f.e. like this:

buf.gen.yaml

plugins:
  - local: protoc-gen-python_betterproto
    out: gen
    post:
      - "ruff --fix $out"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant