beginners question: the linting failed on <a small...
# dev
r
beginners question: the linting failed on a small PR I made. How do I run that locally to catch this before getting as far as the PR?
b
make checks-validator
we should make it shorter
r
thanks
Copy code
$ make checks-validator
/opt/homebrew/bin/go mod download
/opt/homebrew/bin/go install <http://github.com/golangci/golangci-lint/cmd/golangci-lint|github.com/golangci/golangci-lint/cmd/golangci-lint>
/opt/homebrew/bin/go install <http://google.golang.org/protobuf/cmd/protoc-gen-go|google.golang.org/protobuf/cmd/protoc-gen-go>
/Users/rmoff/go/bin/golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: gofmt: can't extract issues from gofmt diff output "--- /Users/rmoff/git/lakeFS/pkg/permissions/actions.gen.go.orig\t2023-03-13 11:30:11\n+++ /Users/rmoff/git/lakeFS/pkg/permissions/actions.gen.go\t2023-03-13 11:30:11\n@@ -1,5 +1,4 @@\n // Code generated by extract_actions. DO NOT EDIT.\n-//\n package permissions\n \n var Actions = []string{\n": can't parse patch: parsing time "2023-03-13 11:30:11" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700"
ERRO Running error: 1 error occurred:
        * can't run linter goanalysis_metalinter: gofmt: can't extract issues from gofmt diff output "--- /Users/rmoff/git/lakeFS/pkg/permissions/actions.gen.go.orig\t2023-03-13 11:30:11\n+++ /Users/rmoff/git/lakeFS/pkg/permissions/actions.gen.go\t2023-03-13 11:30:11\n@@ -1,5 +1,4 @@\n // Code generated by extract_actions. DO NOT EDIT.\n-//\n package permissions\n \n var Actions = []string{\n": can't parse patch: parsing time "2023-03-13 11:30:11" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700"

make: *** [lint] Error 3
something up with my local timezone setting? or s'thing else?
b
the issue is related to your diff command
brew install diffutils
not next to my laptop to verify
r
sorry, I've realised that
make checks-validator
is there in the docs, i should have RTFMd…
brew install diffutils
fixed things too, I'll add a note to
contributing.md
😨 1
thanks @Barak Amar
lakefs 1
b
Thanks, added small comment to the pr.
135 Views