pre-commit-tasks
is a Visual Studio Code Extension that provides a Task Provider for pre-commit hooks without having to commit. It parses the .pre-commit-config.yaml
and registers a Test Task for each hook parsed.
Tasks can be run by clicking Terminal > Run Task...
in the program menu. All tasks will be found in the pre-commit
task provider. A user can either select a specific task or select Run All
and all pre-commit hooks will be invoked.
Any time a user changes the .pre-commit-config.yaml
, the task provider will dump its parsed cache and force a reparse the next time the user tries to select a task to run.
When the pre-commit task fails, it uses a Problem Matcher defined in the package.json to determine if it can parse the pre-commit error and add it to the PROBLEMS
panel and highlight it in the IDE. This makes it easier to spot where pre-commit linting errors are located.
pre-commit-tasks
has a runtime dependency on the yaml
NPM package for parsing of the .pre-commit-config.yaml
file, but that will be handled for you on installation of the extension.
This extension contributes the following settings:
pre-commit-tasks.enable
: enable/disable this extensionpre-commit-tasks.debug
: set totrue
to have the Task Provider detection logic emit an Output pane explaining its decision-making
Initial Release