Skip to content

Lint Executor

Terminal window
nx lint my-go-app
OptionTypeDefaultDescription
linterstring”go fmt”The command to execute instead of go fmt
argsstring[]-Extra args when linting the project
{
"executor": "@naxodev/gonx:lint",
"cache": true,
"inputs": ["{projectRoot}/go.mod", "{projectRoot}/go.sum", "{projectRoot}/**/*.{go}"]
}
"@naxodev/gonx:lint": {
"cache": true,
"inputs": [
"{projectRoot}/go.mod",
"{projectRoot}/go.sum",
"{projectRoot}/**/*.{go}"
],
"options": {
"linter": "golangci-lint run"
}
},
  • The lint executor is cacheable
  • You can customize the linting tool (for example, use gofmt or golangci-lint instead of go fmt)
  • Uses the official Go tooling in the background