Skip to content

Commit

Permalink
fix: enforce comment spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
  • Loading branch information
mateusoliveira43 committed May 27, 2024
1 parent 32bc517 commit 6006064
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 2 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ linters-settings:
#
- name: bool-literal-in-expr
- name: constant-logical-expr
- name: comment-spacings

linters:
disable-all: true
Expand Down
6 changes: 6 additions & 0 deletions docs/book/src/cronjob-tutorial/testdata/project/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
6 changes: 6 additions & 0 deletions docs/book/src/getting-started/testdata/project/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
2 changes: 1 addition & 1 deletion pkg/cli/alpha.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var alphaCommands = []*cobra.Command{

func newAlphaCommand() *cobra.Command {
cmd := &cobra.Command{
//TODO: If we need to create alpha commands please add a new file for each command
// TODO: If we need to create alpha commands please add a new file for each command
}
return cmd
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
linters-settings:
revive:
rules:
- name: comment-spacings
`
2 changes: 1 addition & 1 deletion pkg/rescaffold/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func copyFile(src, des string) error {
if err != nil {
return fmt.Errorf("Source file path: %s does not exist. %v", src, err)
}
//Copy all the contents to the desitination file
// Copy all the contents to the desitination file
// nolint:gosec
return os.WriteFile(des, bytesRead, 0755)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
6 changes: 6 additions & 0 deletions testdata/project-v4-multigroup/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
6 changes: 6 additions & 0 deletions testdata/project-v4-with-deploy-image/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
6 changes: 6 additions & 0 deletions testdata/project-v4-with-grafana/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
6 changes: 6 additions & 0 deletions testdata/project-v4/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings

0 comments on commit 6006064

Please sign in to comment.