-
Notifications
You must be signed in to change notification settings - Fork 7
Labels
⚙️ EnhancementImprovements and optimizations of existing featuresImprovements and optimizations of existing features
Description
Problem description
We use both taplo-format and taplo-lint hooks in all our repositories. That's fantastic, but it feels a little slow.
Digging a little more, looks like taplo-lint fetches data from the internet on each run, and depending on the network, that adds a handful of seconds (or plain time-out error), which is bad for a pre-commit hook.
Proposed solution
taplo implements caching already!
After a mkdir .taplo-cache on my local repo, this works like a charm:
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-lint
args: [--default-schema-catalogs, --cache-path=.taplo-cache]While that works, there are some drawbacks:
- cache is not shared between projects (while I guess it's always the same)
- the
.taplo-cachedirectory must exist already: taplo does not create by itself nor errors out when that's missing
Given that pre-commit creates a venv when running these hooks, it would be fantastic if the cache was over there.
What do you think? I'd like to create a PR if we agree on this issue. Also, if you have any suggestion don't hesitate.
What should the interface look like?
Additional context
No response
petrus-v, redeboer and Gnonpi
Metadata
Metadata
Assignees
Labels
⚙️ EnhancementImprovements and optimizations of existing featuresImprovements and optimizations of existing features