Skip to content

Commit

Permalink
ci: add husky for pre-commits (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayerOrnstein authored May 21, 2024
1 parent 53f934a commit 0cf173f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

dart run commitlint_cli --edit ${1}
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

dart format --line-length 80 --set-exit-if-changed lib test
flutter analyze
flutter test
1 change: 1 addition & 0 deletions commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:commitlint_cli/commitlint.yaml
40 changes: 40 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.11"
ansi:
dependency: transitive
description:
name: ansi
sha256: "070af96189f9da6f996cee46049682bdcd1d191b483e13f9d2a2600729d8b2a1"
url: "https://pub.dev"
source: hosted
version: "0.4.2"
ansicolor:
dependency: transitive
description:
Expand Down Expand Up @@ -193,6 +201,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
change_case:
dependency: transitive
description:
name: change_case
sha256: f4e08feaa845e75e4f5ad2b0e15f24813d7ea6c27e7b78252f0c17f752cf1157
url: "https://pub.dev"
source: hosted
version: "1.1.0"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -249,6 +265,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
commitlint_cli:
dependency: "direct dev"
description:
name: commitlint_cli
sha256: "59921b80b415b81cabbbcf7e18a99aacd3a13eafbb040a19f8804ef4473fd7af"
url: "https://pub.dev"
source: hosted
version: "0.7.1"
connecteo:
dependency: "direct main"
description:
Expand Down Expand Up @@ -676,6 +700,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
husky:
dependency: "direct dev"
description:
name: husky
sha256: ce4a92b311c03e67ff66b6e354c8d5b8ee7c663ccaedb954e93798658b439bb2
url: "https://pub.dev"
source: hosted
version: "0.1.7"
hydrated_bloc:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1391,6 +1423,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
verbose:
dependency: transitive
description:
name: verbose
sha256: "8e63580e35d58a15e4fca702fe91766430b1d28738c160c466e5cb10c373002a"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
very_good_analysis:
dependency: "direct dev"
description:
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ dependency_overrides:
dev_dependencies:
bloc_test: ^9.1.6
build_runner: ^2.4.9
commitlint_cli: ^0.7.1
flutter_gen_runner: ^5.4.0
flutter_launcher_icons: ^0.13.1
flutter_native_splash: ^2.4.0
flutter_test:
sdk: flutter
husky: ^0.1.7
mocktail: ^1.0.3
path: ^1.8.3
sentry_dart_plugin: ^2.0.0
Expand Down

0 comments on commit 0cf173f

Please sign in to comment.