Skip to content

Commit 420b324

Browse files
committed
docs: add a quick note on linting in contributing guidelines
Signed-off-by: Mickael Carl <[email protected]>
1 parent 34072ff commit 420b324

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ go build ./cmd/prometheus/
4242
make test # Make sure all the tests pass before you commit and push :)
4343
```
4444

45-
We use [`golangci-lint`](https://github.com/golangci/golangci-lint) for linting the code. If it reports an issue and you think that the warning needs to be disregarded or is a false-positive, you can add a special comment `//nolint:linter1[,linter2,...]` before the offending line. Use this sparingly though, fixing the code to comply with the linter's recommendation is in general the preferred course of action.
45+
To run a collection of Go linters through [`golangci-lint`](https://github.com/golangci/golangci-lint), do:
46+
```bash
47+
make lint
48+
```
49+
50+
If it reports an issue and you think that the warning needs to be disregarded or is a false-positive, you can add a special comment `//nolint:linter1[,linter2,...]` before the offending line. Use this sparingly though, fixing the code to comply with the linter's recommendation is in general the preferred course of action. See [this section of the golangci-lint documentation](https://golangci-lint.run/usage/false-positives/#nolint-directive) for more information.
4651

4752
All our issues are regularly tagged so that you can also filter down the issues involving the components you want to work on. For our labeling policy refer [the wiki page](https://github.com/prometheus/prometheus/wiki/Label-Names-and-Descriptions).
4853

0 commit comments

Comments
 (0)