precommit

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideDefaultConfig

func ProvideDefaultConfig() (string, error)

ProvideDefaultConfig will render a default pre-commit yaml file if doesn't exist to bootstrap the project.

Types

type Precommit

type Precommit mg.Namespace

Precommit contains tasks for Pre-commit for pre-commit/pre-push automation.

func (Precommit) Commit

func (Precommit) Commit() error

🧪 Commit runs pre-commit checks using pre-commit.

If using pre-commit framework you can see the available stages on the [docs](https://pre-commit.com/#confining-hooks-to-run-at-certain-stages).

> "The stages property is an array and can contain any of commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite, and manual.".

func (Precommit) Init

func (Precommit) Init() error

⚙️ Init configures precommit hooks.

func (Precommit) Prepush

func (Precommit) Prepush() error

🧪 Push runs pre-push checks using pre-commit.

func (Precommit) Uninstall

func (Precommit) Uninstall() error

✖ Uninstall removes the pre-commit hooks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL