Closed
Description
Currently neither the golangci-lint run
nor the gokart scan --globalsTainted --verbose
do catch some things that gofmt -w -s .
does to code.
We can do gofmt -l .
that lists all the files that are not aligned w/ the gofmt (~something like a dry run) and check if the output is empty.
Currently it's complaining about terrratest:
gofmt -l .
terratest/test/init.go
terratest/test/k8gb_abstract_full_roundrobin_test.go
terratest/test/k8gb_basic_app_test.go
terratest/test/k8gb_failover_playground_test.go
terratest/test/k8gb_full_failover_test.go
terratest/test/k8gb_full_roundrobin_test.go
terratest/test/k8gb_ingress_annotation_failover_test.go
terratest/test/k8gb_ingress_annotation_rr_test.go
terratest/test/k8gb_lifecycle_test.go
terratest/test/k8gb_split_failover_test.go
I've checked couple of those and it's my work, perhaps I will setup also some pre-commit hook w/ gofmt. We could have this also in the repo itself, but it might be controversial.
note:
gofmt has an option -s
that can simplify the code and these wannabe modifications are not listed w/ -l
, but these can be checked by gofmt -s -d .
(again if the output is empty, we are good)
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done
Activity