Skip to content

Commit 6684c8b

Browse files
authored
update new-linters doc (#1167)
1 parent fa7adcb commit 6684c8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/docs/contributing/new-linters.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ After that:
1717
Run `T=yourlintername.go make test_linters` to ensure that test fails.
1818
2. Add a new file `pkg/golinters/{yourlintername}.go`. Look at other linters in this directory. Implement linter integration and check that test passes.
1919
3. Add the new struct for the linter (which you've implemented in `pkg/golinters/{yourlintername}.go`) to the
20-
list of all supported linters in [`pkg/lint/lintersdb/lintersdb.go`](https://github.com/golangci/golangci-lint/blob/master/pkg/lint/lintersdb/lintersdb.go)
20+
list of all supported linters in [`pkg/lint/lintersdb/manager.go`](https://github.com/golangci/golangci-lint/blob/master/pkg/lint/lintersdb/manager.go)
2121
to the function `GetAllSupportedLinterConfigs`. Enable it by default only if you are sure.
2222
4. Find out what options do you need to configure for the linter. For example, `govet` has
23-
only 1 option: [`check-shadowing`](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml#L20).
23+
only 1 option: [`check-shadowing`](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml).
2424
Choose default values to not being annoying for users of golangci-lint. Add configuration options to:
2525

2626
- [.golangci.example.yml](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml) - the example of a configuration file. You can also add
2727
them to [.golangci.yml](https://github.com/golangci/golangci-lint/blob/master/.golangci.yml) if you think
2828
that this project needs not default values.
29-
- [config struct](https://github.com/golangci/golangci-lint/blob/master/pkg/config/config.go#L61) - don't forget
29+
- [config struct](https://github.com/golangci/golangci-lint/blob/master/pkg/config/config.go) - don't forget
3030
about `mapstructure` tag for proper configuration files parsing by [pflag](https://github.com/spf13/pflag).
3131

3232
5. Take a look at the example of [Pull Request with new linter support](https://github.com/golangci/golangci-lint/pull/850).

0 commit comments

Comments
 (0)