Skip to content

Lint executor

The lint executor formats and lints a Go project. By default it runs go fmt ./....

nx lint my-go-project
OptionTypeDefaultDescription
linterstringgo fmtThe command to execute instead of go fmt.
argsstring[]-Extra args passed to the linter.

When linter is set, the executor runs that command with args and ./... appended, bypassing go fmt.

Inferred for all Go projects (applications and libraries):

{
  "executor": "@naxodev/gonx:lint",
  "cache": true,
  "inputs": ["{projectRoot}/go.mod", "{projectRoot}/go.sum", "{projectRoot}/**/*.{go}"]
}