Skip to content

dirien/pre-commit-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit-hooks

Go pre-commit Git

This repository contains a collection of Git hooks to be used with the pre-commit framework.

Available Hooks ⚓

Go

  • golangci-lint: golangci-lint is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, has integrations with all major IDE and has dozens of linters included.

Usage ⚙

Create a .pre-commit-config.yaml inside your code repositories and add the hook.

repos:
  - repo: https://github.com/dirien/pre-commit-hooks
    rev: <VERSION> # Check for the latest version: https://github.com/dirien/pre-commit-hooks/releases
    hooks:
      - id: golangci-lint

Once you created the configuration file inside your repository, you must run pre-commit install to activate the hook.

That's it, pre-commit will now check for changes and run the hook.