Closed apomalyn closed 3 months ago
As a developer, I don't want to commit code that hasn't been formatted, write a commit message not formatted, or push non linted code.
.githooks/pre-commit
dart format
Commit formatted files
pr-workflow.yaml
--set-exit-if-changed
flutter format lib test
Format files in lib and test directories
.githooks/commit-message
.githooks/pre-push
flutter analyze
As a developer, I don't want to commit code that hasn't been formatted, write a commit message not formatted, or push non linted code.
What needs to be done
.githooks/pre-commit
script that formats that:dart format
),Commit formatted files
step frompr-workflow.yaml
--set-exit-if-changed
toflutter format lib test
fromFormat files in lib and test directories
step frompr-workflow.yaml
.githooks/commit-message
script that validates the commit message format to respect the conventional commit specs.githooks/pre-push
script that:flutter analyze
on the entire project (if possible only run on the files that are about to be pushed)