The fastest polyglot Git hooks manager out there
<img align="right" width="147" height="100" title="Lefthook logo" src="https://raw.githubusercontent.com/Arkweid/lefthook/master/logo_sign.svg?sanitize=true">
Fast and powerful Git hooks manager for Node.js, Ruby or any other type of projects.
pre-push
hook.This repo is just Dart-wrapper for Lefthook. For detailed documentation, check the main repository.
pub global activate lefthook
You are beautiful! Just create lefthook.yml
in root of your project, add description of hooks, and start using it.
For project based on Flutter, you can run formatter before every commit and run tests and static analysis before push.
# lefthook.yml
pre-push:
parallel: true
commands:
tests:
run: flutter test
linter:
run: flutter analyze lib
pre-commit:
commands:
pretty:
glob: "*.dart"
run: flutter format {staged_files}
More examples in documentation of original repository.