This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Origin: https://gist.githubusercontent.com/Cynnexis/16b64199d9a94684a638f08b3fc893d3/raw/pre-commit | |
# | |
# This pre-commit hook run dartfmt on your code. If the code is not | |
# well-formatted, it will format it automatically, and then abort the commit | |
# (so you can review the changes). Make sure you changed "/path/to/dartfmt". On | |
# Windows, you can use an absolute path to your path.exe formatted as POSIX. For | |
# instance: "/d/Developer/Dart/dart-sdk/bin/dartfmt.bat" (note that the driver | |
# name is in lower case, and that the back-slashes are replaced with slashes). |