lan

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: BSD-3-Clause Imports: 16 Imported by: 0

README

lan

Git hook for executing tests on commit of go packages.

This hook executes the tests of the packages in the folder and subfolders of the git repository. If any test fails then the commit is denied. The timeout for the tests is 30s for each package. This hook also verifies if the coverage of the tests is 100%. If not then the commit is denied.

This hook executes go vet in each package. If it exits with a non-zero value then the commit is denied.

This hook checks if the package needs tests but doesn't have them. If this occurs then the commit is denied.

Install on Windows

Clone this repository and run go build (requires Go version 1.24rc3 or higher). Take the generated executable and place it in the .git\hooks folder of your repository. Rename the executable to pre-commit.exe.

Install on Linux

Clone this repository and run go build (requires Go version 1.24rc3 or higher). Take the generated executable and place it in the .git/hooks folder of your repository. Rename the executable to pre-commit and give it execution permission.

Documentation

Overview

This command is a Git hook. It is intended to be used as the pre-commit hook.

Jump to

Keyboard shortcuts

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