Lint Executor
nx lint my-go-app
Options
Section titled “Options”Option | Type | Default | Description |
---|---|---|---|
linter | string | ”go fmt” | The command to execute instead of go fmt |
args | string[] | - | Extra args when linting the project |
Default Inferred
Section titled “Default Inferred”{ "executor": "@naxodev/gonx:lint", "cache": true, "inputs": ["{projectRoot}/go.mod", "{projectRoot}/go.sum", "{projectRoot}/**/*.{go}"]}
Using golangci-lint
Section titled “Using golangci-lint”"@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