Skip to content

Commit 59202b1

Browse files
authoredMar 12, 2024
docs: improve grammar in the custom linter article (golangci#4489)
1 parent 9b52349 commit 59202b1

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed
 

‎.custom-gcl.reference.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Require.
33
version: v1.56.2
44

5-
# the name of the custom binary.
5+
# The name of the custom binary.
66
# Optional.
77
# Default: custom-gcl
88
name: custom-golangci-lint

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ Typically, these linters can't be open-sourced or too specific.
4848

4949
Such linters can be added through 2 plugin systems:
5050

51-
- [Go Plugin System](/plugins/module-plugins)
52-
- [Module Plugin System](/plugins/go-plugins)
51+
1. [Go Plugin System](/plugins/module-plugins)
52+
2. [Module Plugin System](/plugins/go-plugins)

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ An example linter can be found at [here](https://github.com/golangci/example-plu
66

77
## The Automatic Way
88

9-
- define your building configuration into `.custom-gcl.yml`
10-
- 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`.
12-
- run your custom version of golangci-lint
9+
- Define your building configuration into `.custom-gcl.yml`.
10+
- 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`.
12+
- Run your custom version of golangci-lint.
1313

1414
Requirements:
1515
- Go
@@ -47,11 +47,11 @@ linters:
4747
4848
## The Manual Way
4949
50-
- add a blank-import of your module inside `cmd/golangci-lint/plugins.go`
51-
- run `go mod tidy`. (the module containing the plugin will be imported)
52-
- run `make build`
53-
- define the plugin inside the configuration `linters-settings.custom` section with the type `module`.
54-
- run your custom version of golangci-lint
50+
- Add a blank-import of your module inside `cmd/golangci-lint/plugins.go`.
51+
- Run `go mod tidy` (the module containing the plugin will be imported).
52+
- Run `make build`.
53+
- Define the plugin inside the configuration `linters-settings.custom` section with the type `module`.
54+
- Run your custom version of golangci-lint.
5555

5656
### Configuration Example
5757

‎pkg/commands/internal/builder.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,35 @@ func NewBuilder(logger logutils.Log, cfg *Configuration, root string) *Builder {
3737

3838
// Build builds the custom binary.
3939
func (b Builder) Build(ctx context.Context) error {
40-
b.log.Infof("Cloning golangci-lint repository.")
40+
b.log.Infof("Cloning golangci-lint repository")
4141

4242
err := b.clone(ctx)
4343
if err != nil {
4444
return fmt.Errorf("clone golangci-lint: %w", err)
4545
}
4646

47-
b.log.Infof("Adding plugin imports.")
47+
b.log.Infof("Adding plugin imports")
4848

4949
err = b.updatePluginsFile()
5050
if err != nil {
5151
return fmt.Errorf("update plugin file: %w", err)
5252
}
5353

54-
b.log.Infof("Adding replace directives.")
54+
b.log.Infof("Adding replace directives")
5555

5656
err = b.addReplaceDirectives(ctx)
5757
if err != nil {
5858
return fmt.Errorf("add replace directives: %w", err)
5959
}
6060

61-
b.log.Infof("Running go mod tidy.")
61+
b.log.Infof("Running go mod tidy")
6262

6363
err = b.goModTidy(ctx)
6464
if err != nil {
6565
return fmt.Errorf("go mod tidy: %w", err)
6666
}
6767

68-
b.log.Infof("Building golangci-lint binary.")
68+
b.log.Infof("Building golangci-lint binary")
6969

7070
binaryName := b.getBinaryName()
7171

@@ -74,7 +74,7 @@ func (b Builder) Build(ctx context.Context) error {
7474
return fmt.Errorf("build golangci-lint binary: %w", err)
7575
}
7676

77-
b.log.Infof("Moving golangci-lint binary.")
77+
b.log.Infof("Moving golangci-lint binary")
7878

7979
err = b.copyBinary(binaryName)
8080
if err != nil {

0 commit comments

Comments
 (0)
Please sign in to comment.