My pre-commit configuration has the following: ```...
# general
s
My pre-commit configuration has the following:
Copy code
- repo: local
  hooks:
  - id: tailor
    name: Check BUILD files
    entry: 'pants --changed-since=HEAD tailor --check update-build-files --check'
    language: system
    pass_filenames: false
  - id: format
    name: Rust & Black
    entry: 'pants --changed-since=HEAD fix'
    language: system
    pass_filenames: false
  - id: lint
    name: Linter
    entry: 'pants --changed-since=HEAD --changed-dependents=transitive lint'
    language: system
    pass_filenames: false
  - id: typecheck
    name: Type checker
    entry: 'pants --changed-since=HEAD --changed-dependents=transitive check'
    language: system
    pass_filenames: false
But it still feels slow... Is there a way to make it faster?
b
Can you share your
pants.toml
?
👍 1
s
pants.toml
b
That seems sensible, so no easy win there. Is it any faster to put the commands together? (and does that give acceptable output) e.g. just two hooks 1.
pants --changed-since=HEAD tailor --check update-build-files --check fix
2.
pants --changed-since=HEAD --changed-dependents=transitive lint check
(Also, side note, but it might make sense to remove the `--check`s there for the first one, since they're pretty similar to running
fix
automatically)
s
I think it is. I'll ask the others on the team what they think about it, but I think it's good. 👍
Thanks 🙏