Skip to content

Commit 6006064

Browse files
author
Mateus Oliveira
committed
fix: enforce comment spaces
Signed-off-by: Mateus Oliveira <[email protected]>
1 parent 32bc517 commit 6006064

File tree

11 files changed

+51
-2
lines changed

11 files changed

+51
-2
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ linters-settings:
6161
#
6262
- name: bool-literal-in-expr
6363
- name: constant-logical-expr
64+
- name: comment-spacings
6465

6566
linters:
6667
disable-all: true

docs/book/src/cronjob-tutorial/testdata/project/.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ linters:
3434
- misspell
3535
- nakedret
3636
- prealloc
37+
- revive
3738
- staticcheck
3839
- typecheck
3940
- unconvert
4041
- unparam
4142
- unused
43+
44+
linters-settings:
45+
revive:
46+
rules:
47+
- name: comment-spacings

docs/book/src/getting-started/testdata/project/.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ linters:
3434
- misspell
3535
- nakedret
3636
- prealloc
37+
- revive
3738
- staticcheck
3839
- typecheck
3940
- unconvert
4041
- unparam
4142
- unused
43+
44+
linters-settings:
45+
revive:
46+
rules:
47+
- name: comment-spacings

pkg/cli/alpha.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var alphaCommands = []*cobra.Command{
3535

3636
func newAlphaCommand() *cobra.Command {
3737
cmd := &cobra.Command{
38-
//TODO: If we need to create alpha commands please add a new file for each command
38+
// TODO: If we need to create alpha commands please add a new file for each command
3939
}
4040
return cmd
4141
}

pkg/plugins/golang/v4/scaffolds/internal/templates/golangci.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,15 @@ linters:
7878
- misspell
7979
- nakedret
8080
- prealloc
81+
- revive
8182
- staticcheck
8283
- typecheck
8384
- unconvert
8485
- unparam
8586
- unused
87+
88+
linters-settings:
89+
revive:
90+
rules:
91+
- name: comment-spacings
8692
`

pkg/rescaffold/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func copyFile(src, des string) error {
330330
if err != nil {
331331
return fmt.Errorf("Source file path: %s does not exist. %v", src, err)
332332
}
333-
//Copy all the contents to the desitination file
333+
// Copy all the contents to the desitination file
334334
// nolint:gosec
335335
return os.WriteFile(des, bytesRead, 0755)
336336
}

testdata/project-v4-multigroup-with-deploy-image/.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ linters:
3434
- misspell
3535
- nakedret
3636
- prealloc
37+
- revive
3738
- staticcheck
3839
- typecheck
3940
- unconvert
4041
- unparam
4142
- unused
43+
44+
linters-settings:
45+
revive:
46+
rules:
47+
- name: comment-spacings

testdata/project-v4-multigroup/.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ linters:
3434
- misspell
3535
- nakedret
3636
- prealloc
37+
- revive
3738
- staticcheck
3839
- typecheck
3940
- unconvert
4041
- unparam
4142
- unused
43+
44+
linters-settings:
45+
revive:
46+
rules:
47+
- name: comment-spacings

testdata/project-v4-with-deploy-image/.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ linters:
3434
- misspell
3535
- nakedret
3636
- prealloc
37+
- revive
3738
- staticcheck
3839
- typecheck
3940
- unconvert
4041
- unparam
4142
- unused
43+
44+
linters-settings:
45+
revive:
46+
rules:
47+
- name: comment-spacings

testdata/project-v4-with-grafana/.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ linters:
3434
- misspell
3535
- nakedret
3636
- prealloc
37+
- revive
3738
- staticcheck
3839
- typecheck
3940
- unconvert
4041
- unparam
4142
- unused
43+
44+
linters-settings:
45+
revive:
46+
rules:
47+
- name: comment-spacings

0 commit comments

Comments
 (0)