Skip to content

mrsimonemms/pre-commit-hooks

Repository files navigation

pre-commit-hooks

Reusable pre-commit hooks

Hooks

Go Err Check

Go-ified version of hook in Bahjat's project

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: go-err-check

Use kisielk/errcheck to check that you checked errors

Go Fumpt

Go-ified version of hook in Bahjat's project

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: gofumpt

Use mvdan/gofumpt to check your Go formatting

Go Fmt Import

Go-ified version of hook in Bahjat's project

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: go-fmt-import

Use goimports to format your import statementstps://github.com/mvdan/gofumpt) to check your Go formatting

Go Static Check

Go-ified version of hook in Bahjat's project

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: go-static-check

Use staticcheck to lint your Go code

Go Vet

Go-ified version of hook in Bahjat's project

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: go-vet

Use go vet to check your Go code

License-Eye

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: license-eye

Add SkyWalking-Eyes and check that the files have the correct headers implemented.

Packer Format

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: packer-fmt

Run Packer fmt command.

Packer Validate

repos:
  - repo: https://github.com/mrsimonemms/pre-commit-hooks
    rev: "" # Use the ref you want to point at
    hooks:
      - id: packer-validate

Run Packer validate command.

Contributing

Open in Gitpod

Open in a container