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 and disable pkg caching #545

Merged

Conversation

dmigwi
Copy link
Collaborator

@dmigwi dmigwi commented Jun 20, 2024

Due to caching the golangci linter is failing during the environment preparation phase:

  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/h2non/go-is-svg@v0.0.0-20160927212452-35e8c4b0612c/svg.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/pkg/errors@v0.9.1/format_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/pkg/errors@v0.9.1/json_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/pkg/errors@v0.9.1/example_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/pkg/errors@v0.9.1/errors.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/pkg/errors@v0.9.1/go113.go: Cannot open: File exists
...

The solution adapted here has been copied from: thought-machine/please#3162

@dmigwi dmigwi changed the title Try disabling caching on golangci-lint action Update golangci-lint to v1.59.1 and disabling pkg caching Jun 20, 2024
@dmigwi dmigwi force-pushed the prevent-build-dependencies-caching branch from bb0166c to 9078834 Compare June 20, 2024 17:03
@dmigwi dmigwi changed the title Update golangci-lint to v1.59.1 and disabling pkg caching Update golangci-lint to v1.59.1 and disable pkg caching Jun 20, 2024
@dmigwi dmigwi force-pushed the prevent-build-dependencies-caching branch from 9078834 to c68934e Compare June 20, 2024 17:16
@dmigwi dmigwi force-pushed the prevent-build-dependencies-caching branch from c68934e to bb3c92d Compare June 20, 2024 17:25
@dmigwi
Copy link
Collaborator Author

dmigwi commented Jun 20, 2024

To run the golangci linter on your local machine just execute the following:

# Install the linter binary
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1

#Run the linter with the necessary flags
golangci-lint run --disable-all -E govet,staticcheck,gosimple,unconvert,ineffassign,revive,goimports,unparam,errcheck --timeout=10m -v

@dmigwi dmigwi mentioned this pull request Jun 20, 2024
3 tasks
@dreacot dreacot merged commit 9ecdf38 into crypto-power:master Jun 21, 2024
1 check passed
dreacot pushed a commit that referenced this pull request Jun 26, 2024
* Try disabling caching on golangci-lint action

* Fix linter errors of golangci upgrade

* Add the errcheck linter option

* Add linter errcheck ignore functions

* Pass correct arguments to the linter

* Set linter timeout to 10 min
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants