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
Option Type Default Description
linter string go fmt The command to execute when running the lint executor instead of go fmt.
args string[] - Extra args when linting the project

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": ["goSource", "^goSource"]
}

See caching and inputs for what goSource and ^goSource hash.