Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update golangci lint to v1.59.1 #97

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
with:
go-version-file: '.go-version'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.54.2
version: v1.59.1
2 changes: 1 addition & 1 deletion cmd/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func newAttributeCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "attribute",
Short: "Edit attribute",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return cmd.Help()
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func newBlockCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "block",
Short: "Edit block",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return cmd.Help()
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/body.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func newBodyCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "body",
Short: "Edit body",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return cmd.Help()
},
}
Expand Down
4 changes: 4 additions & 0 deletions editor/operator_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func UpdateFile(filename string, filter Filter) error {
}

// Write contents back to source file if changed.
// nolint gosec
// G306: Expect WriteFile permissions to be 0600 or less
// We ignore it because the update operation does not affect file
// permissions.
if err = os.WriteFile(filename, output, os.ModePerm); err != nil {
return fmt.Errorf("failed to write file: %s", err)
}
Expand Down