Skip to content

GO

Linters

Linter Additional
golangci-lint
GO_GOLANGCI_LINT
GitHub stars autofix sarif
revive
GO_REVIVE
GitHub stars sarif

Linted files

  • File extensions:
    • .go

Configuration in MegaLinter

Variable Description Default value
GO_PRE_COMMANDS List of bash commands to run before the linters None
GO_POST_COMMANDS List of bash commands to run after the linters None
GO_FILTER_REGEX_INCLUDE Custom regex including filter
GO_FILTER_REGEX_EXCLUDE Custom regex excluding filter

Behind the scenes

Installation

  • Dockerfile commands :
# renovate: datasource=repology depName=alpine_edge/go versioning=loose
ARG GO_ALPINE_VERSION=1.26.2-r0
RUN apk add --no-cache \
    --repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \
    --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
    go=${GO_ALPINE_VERSION}