Replies: 1 comment 5 replies
-
I think you are mistaken. Unless I'm missing something, it sounds like
Source: https://biomejs.dev/guides/integrate-in-vcs/#process-only-changed-files |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suggestion: A way to instruct biome to lint only files that have been changed according to git.
My current solution is doing this:
git diff --name-only --diff-filter=d HEAD | xargs biome check --write
. (This command uses git to get a list of all file names of changed files, excluding deleted files, and passes them to biome)Reason: A full project checkwrite takes 2 seconds in my project, and it's one of the things our developers run to prepare their code to push to github, so this 2 seconds is a painfully long time. Linting only changed files takes this from 2 seconds to being instant in almost all cases. CI tests still lint the entire project, so there's no chance anything was missed. A simple option to make biome run much faster seems like a clear win.
I would suggest a flag/setting that tells biome to only process files changed according to git, and could be used when checking or writing. If, it's accepted as a feature idea, I would consider trying to PR it myself.
Note:
There exists a --changed flag already in biome, it does something different and can't be used to do this.
There exists a
--staged
flag, but it effects only staged files, the suggested flag would lint all changes.Beta Was this translation helpful? Give feedback.
All reactions