Skip to content

Commit 80c45e7

Browse files
committed
review
1 parent d429bc3 commit 80c45e7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/src/docs/plugins/go-plugins.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ An example linter can be found at [here](https://github.com/golangci/example-plu
4848
If you're looking for instructions on how to configure your own custom linter, they can be found further down.
4949

5050
1. If the project you want to lint does not have one already, copy the [.golangci.yml](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.yml) to the root directory.
51-
2. Adjust the YAML to appropriate `linters-settings.custom` entries as so:
51+
2. Adjust the YAML to appropriate `linters.settings.custom` entries as so:
5252
```yaml title=.golangci.yml
53+
version: "2"
54+
5355
linters:
5456
settings:
5557
custom:

docs/src/docs/plugins/module-plugins.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ An example linter can be found at [here](https://github.com/golangci/example-plu
88

99
- Define your building configuration into `.custom-gcl.yml`.
1010
- Run the command `golangci-lint custom` (or `golangci-lint custom -v` to have logs).
11-
- Define the plugin inside the `linters-settings.custom` section with the type `module`.
11+
- Define the plugin inside the `linters.settings.custom` section with the type `module`.
1212
- Run your custom version of golangci-lint.
1313

1414
Requirements:
@@ -31,6 +31,8 @@ plugins:
3131
```
3232
3333
```yaml title=.golangci.yml
34+
version: "2"
35+
3436
linters:
3537
default: none
3638
enable:
@@ -49,12 +51,14 @@ linters:
4951
- Add a blank-import of your module inside `cmd/golangci-lint/plugins.go`.
5052
- Run `go mod tidy` (the module containing the plugin will be imported).
5153
- Run `make build`.
52-
- Define the plugin inside the configuration `linters-settings.custom` section with the type `module`.
54+
- Define the plugin inside the `linters.settings.custom` section with the type `module`.
5355
- Run your custom version of golangci-lint.
5456

5557
### Configuration Example
5658

5759
```yaml title=.golangci.yml
60+
version: "2"
61+
5862
linters:
5963
default: none
6064
enable:

0 commit comments

Comments
 (0)