You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
BLT's pre-commit hook is hard-coded to execute a bunch of validations, like for composer, yaml, and twig files. These validations occur even if there are no files with the appropriate extensions in the files being committed. This was previously reported in #1104 but the resolution there has since been refactored away.
It looks like the code is designed to not have to execute the linting if there are no files, but it doesn't do that, as seen in this related issue #3009 ... seems like it's always executing an iterator function on the fileset directories to scan, even if there's no files in the changeset.
I would not mind this as much if I could disable just these slow portions of the pre-commit, but they are hardcoded in :/
To Reproduce
Add a .txt file to git stage
Commit it
Observe the git pre-commit hook executes and produces output:
Describe the bug
BLT's pre-commit hook is hard-coded to execute a bunch of validations, like for composer, yaml, and twig files. These validations occur even if there are no files with the appropriate extensions in the files being committed. This was previously reported in #1104 but the resolution there has since been refactored away.
It looks like the code is designed to not have to execute the linting if there are no files, but it doesn't do that, as seen in this related issue #3009 ... seems like it's always executing an iterator function on the fileset directories to scan, even if there's no files in the changeset.
I would not mind this as much if I could disable just these slow portions of the pre-commit, but they are hardcoded in :/
To Reproduce
Expected behavior
Linting of YAML and Twig files does not occur unless files with the relevant extensions are in the changed files list in the commit.
BLT doctor output
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: