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

[hcledit/read] return error if fallback occurred #107

Merged
merged 3 commits into from
Apr 24, 2024

[hcledit/read] rename error for readability

7e17f36
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

[hcledit/read] return error if fallback occurred #107

[hcledit/read] rename error for readability
7e17f36
Select commit
Loading
Failed to load commit list.
GitHub Actions / golangci failed Apr 24, 2024 in 0s

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/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)
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)
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{}