{"repo":"TekWizely/pre-commit-golang","free":true,"listed":false,"github":"https://github.com/TekWizely/pre-commit-golang","clone":"git clone https://github.com/TekWizely/pre-commit-golang.git","description":"Pre-commit hooks for Golang with support for monorepos, the ability to pass arguments and environment variables to all hooks, and the ability to invoke custom go tools.","language":"Shell","stars":374,"topics":["golang","precommit-hooks","mit-license"],"license":"MIT","category":"dev-tools","readme_excerpt":"Pre-Commit-GoLang A set of git pre-commit hooks for Golang with support for multi-module monorepos, the ability to pass arguments and environment variables to all hooks, and the ability to invoke custom go tools. Requires the Pre-Commit.com Hook Management Framework. --------------- Installation You can copy/paste the following snippet into your .pre-commit-config.yaml file. NOTE A more fleshed-out version can be found in sample-config.yaml ----------- Overview Hook Targets File-Based Hooks Some hooks run against matching staged files individually. Module-Based Hooks Some hooks work on a per-module basis. The hooks run against module root folders containing one or more matching staged files. Module Root Folder: A folder containing a go.mod file. Discovered by walking up the folder path from the staged file. Module Mode Module-based hooks enable module mode ( GO111MODULE=on ) before invoking their respective tools. Package-Based Hooks Some hooks work on a per-package basis. The hooks run against folders containing one or more staged files. Package Folder: A folder containing one or more .go files. Package Mode Package-based hooks disable module mode ( GO111MODULE=off ) before invoking their respective tools. Repo-Based Hooks Some hooks run against the entire repo. The hooks only run once (if any matching files are staged), and are NOT provided the list of staged files, ----------------- Hook Suffixes Hooks have suffixes in their name that indicate their targets: Suffix Target ","default_branch":null,"files":null,"tree":[],"storefront":"/r/TekWizely","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/TekWizely/pre-commit-golang/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}