Skip to content

[ci] run lint on pull request #246

[ci] run lint on pull request

[ci] run lint on pull request #246

GitHub Actions / golangci failed Apr 24, 2024 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (2)

internal/handler/block.go|33| File is not gofmt-ed with -s (gofmt)
cmd/hcledit/internal/command/read.go|53| File is not gofmt-ed with -s (gofmt)

Filtered Findings (41)

internal/converter/converter.go|6 col 2| import 'github.com/zclconf/go-cty/cty' is not allowed from list 'Main' (depguard)
internal/converter/converter.go|7 col 2| import 'github.com/zclconf/go-cty/cty/convert' is not allowed from list 'Main' (depguard)
internal/converter/converter.go|8 col 2| import 'github.com/zclconf/go-cty/cty/gocty' is not allowed from list 'Main' (depguard)
internal/ast/ast.go|4 col 2| import 'github.com/hashicorp/hcl/v2/hclsyntax' is not allowed from list 'Main' (depguard)
internal/ast/ast.go|5 col 2| import 'github.com/hashicorp/hcl/v2/hclwrite' is not allowed from list 'Main' (depguard)
internal/ast/object.go|4 col 2| import 'github.com/hashicorp/hcl/v2/hclwrite' is not allowed from list 'Main' (depguard)
internal/ast/object_attribute.go|4 col 2| import 'github.com/hashicorp/hcl/v2/hclsyntax' is not allowed from list 'Main' (depguard)
internal/ast/object_attribute.go|5 col 2| import 'github.com/hashicorp/hcl/v2/hclwrite' is not allowed from list 'Main' (depguard)
internal/ast/parser.go|6 col 2| import 'github.com/hashicorp/hcl/v2/hclsyntax' is not allowed from list 'Main' (depguard)
hcledit.go|49 col 16| Error return value of h.reload is not checked (errcheck)
hcledit.go|79 col 16| Error return value of h.reload is not checked (errcheck)
hcledit.go|116 col 16| Error return value of h.reload is not checked (errcheck)
example_test.go|43 col 15| Error return value of editor.Create is not checked (errcheck)
example_test.go|46 col 15| Error return value of editor.Create is not checked (errcheck)
example_test.go|47 col 15| Error return value of editor.Create is not checked (errcheck)
example_test.go|51 col 15| Error return value of editor.Update is not checked (errcheck)
example_test.go|52 col 15| Error return value of editor.Update is not checked (errcheck)
example_test.go|55 col 15| Error return value of editor.Delete is not checked (errcheck)
internal/handler/handler.go|49 col 3| appendCombine: can combine chain of 2 appends into one (gocritic)
cmd/hcledit/internal/command/read.go|99 col 4| redundantSprint: key is already string (gocritic)
hcledit_test.go|217| File is not gofmt-ed with -s (gofmt)
hcledit_test.go|243| File is not goimports-ed (goimports)
cmd/hcledit/internal/command/create_test.go|88 col 3| unnecessary trailing newline (whitespace)
cmd/hcledit/internal/command/read_test.go|135 col 3| unnecessary trailing newline (whitespace)
cmd/hcledit/internal/command/update_test.go|53 col 1| unnecessary trailing newline (whitespace)
internal/handler/cty.go|5 col 2| import 'github.com/zclconf/go-cty/cty' is not allowed from list 'Main' (depguard)
internal/handler/handler.go|8 col 2| import 'github.com/zclconf/go-cty/cty/gocty' is not allowed from list 'Main' (depguard)
internal/handler/read.go|6 col 2| import 'github.com/hashicorp/hcl/v2' is not allowed from list 'Main' (depguard)
internal/handler/read.go|9 col 2| import 'github.com/zclconf/go-cty/cty' is not allowed from list 'Main' (depguard)
hcledit.go|11 col 2| import 'github.com/hashicorp/hcl/v2' is not allowed from list 'Main' (depguard)
read.go|9 col 2| import 'github.com/hashicorp/hcl/v2' is not allowed from list 'Main' (depguard)
hcledit_test.go|7 col 2| import 'github.com/google/go-cmp/cmp' is not allowed from list 'Main' (depguard)
hcledit_test.go|8 col 2| import 'github.com/google/go-cmp/cmp/cmpopts' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/create.go|6 col 2| import 'github.com/spf13/cobra' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/delete.go|6 col 2| import 'github.com/spf13/cobra' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/read.go|10 col 2| import 'github.com/spf13/cobra' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/create_test.go|7 col 2| import 'github.com/google/go-cmp/cmp' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/create_test.go|8 col 2| import 'github.com/google/go-cmp/cmp/cmpopts' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/delete_test.go|8 col 2| import 'github.com/google/go-cmp/cmp' is not allowed from list 'Main' (depguard)
cmd/hcledit/internal/command/delete_test.go|9 col 2| import 'github.com/google/go-cmp/cmp/cmpopts' is not allowed from list 'Main' (depguard)
internal/walker/walker.go|110 col 3| shadow: declaration of "keytrail" shadows declaration at line 102 (govet)

Annotations

Check failure on line 33 in internal/handler/block.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] internal/handler/block.go#L33

File is not `gofmt`-ed with `-s` (gofmt)
Raw output
internal/handler/block.go:33: File is not `gofmt`-ed with `-s` (gofmt)
				true,	

Check failure on line 53 in cmd/hcledit/internal/command/read.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/hcledit/internal/command/read.go#L53

File is not `gofmt`-ed with `-s` (gofmt)
Raw output
cmd/hcledit/internal/command/read.go:53: File is not `gofmt`-ed with `-s` (gofmt)
	readOpts:= []hcledit.Option{}