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

chore: upgrade golangci-lint #4029

Merged
merged 1 commit into from
Oct 29, 2023
Merged

chore: upgrade golangci-lint #4029

merged 1 commit into from
Oct 29, 2023

Conversation

atzoum
Copy link
Contributor

@atzoum atzoum commented Oct 27, 2023

Description

Upgrading golangci lint to the latest version and using a local golangci-lint binary instead of the docker image for lightning-fast lints!

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@atzoum atzoum requested review from cisse21 and lvrach October 27, 2023 15:45
@lvrach
Copy link
Member

lvrach commented Oct 27, 2023

@fracasula had a reasoning for using the docker image. Want to make sure he checks this PR

@atzoum atzoum requested a review from fracasula October 27, 2023 15:49
@atzoum
Copy link
Contributor Author

atzoum commented Oct 27, 2023

@fracasula had a reasoning for using the docker image. Want to make sure he checks this PR

https://golangci-lint.run/usage/install/#binaries

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3ee4c7b) 71.39% compared to head (d49a687) 71.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4029      +/-   ##
==========================================
+ Coverage   71.39%   71.47%   +0.08%     
==========================================
  Files         370      370              
  Lines       54614    54614              
==========================================
+ Hits        38994    39038      +44     
+ Misses      13294    13251      -43     
+ Partials     2326     2325       -1     

see 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fracasula
Copy link
Collaborator

@fracasula had a reasoning for using the docker image. Want to make sure he checks this PR

Had compatibility issues in the past, it works like a charm now 👍


.PHONY: lint
lint: fmt ## Run linters on all go files
docker run --rm -v $(shell pwd):/app:ro -w /app golangci/golangci-lint:v1.54.2 bash -e -c \
'golangci-lint run -v --timeout 5m'
golangci-lint run -v --timeout 5m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we do:

Suggested change
golangci-lint run -v --timeout 5m
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.1 run

A simpler way to have multiple version of golangci-lint in the same system

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to always run the latest also in other projects. I don't mind the idea though, I'm good either way tbh 👍

@cisse21 cisse21 merged commit 554a04a into master Oct 29, 2023
40 checks passed
@cisse21 cisse21 deleted the chore.fastgolangcilint branch October 29, 2023 14:13
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.

5 participants