halildurmus_hooks 0.1.1 copy "halildurmus_hooks: ^0.1.1" to clipboard
halildurmus_hooks: ^0.1.1 copied to clipboard

A curated collection of reusable scripts designed to simplify, automate, and standardize common Git hook workflows across projects.

Package: halildurmus_hooks Publisher: halildurmus.dev Language: Dart License: BSD-3-Clause

A collection of scripts for Git hooks.

Use these small Dart CLIs to keep your repo healthy before commits or pushes.

Included scripts #

  • analyze - Runs dart analyze (or flutter analyze with -f).
  • format - Checks formatting with dart format --set-exit-if-changed.
  • test - Runs dart test (or flutter test with -f).
  • check_commit - Validates a commit message against Conventional Commits.
  • bump_version - Calculates the next version from commit messages and updates pubspec.yaml.
  • update_changelog - Uses git-cliff to update CHANGELOG.md.

Usage #

Here's an example Lefthook configuration that uses these scripts:

pre-commit:
  parallel: true
  commands:
    analyze:
      glob: '*.{dart}'
      run: dart run hooks:analyze example lib test
    format:
      glob: '*.{dart}'
      run: dart run hooks:format {staged_files}
    test:
      glob: '{lib,test}/**/*.dart'
      run: dart run hooks:test -- -j 1 --test-randomize-ordering-seed=random

commit-msg:
  commands:
    check_commit:
      run: dart run hooks:check_commit {1}

Notes #

  • analyze and test scripts accept -f / --flutter to run via Flutter.
  • bump_version script expects the latest Git tag to match vX.Y.Z or package_name-vX.Y.Z.
  • update_changelog script requires git-cliff to be installed and available on PATH.
1
likes
160
points
1.26k
downloads

Publisher

verified publisherhalildurmus.dev

Weekly Downloads

A curated collection of reusable scripts designed to simplify, automate, and standardize common Git hook workflows across projects.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, conventional_commit, next_version, yaml_edit

More

Packages that depend on halildurmus_hooks