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 and fix golangci-lint error #3278

Merged
merged 2 commits into from
Aug 15, 2022

Conversation

thinkerou
Copy link
Member

@thinkerou thinkerou commented Aug 15, 2022

upgrade golangci-lint to fix the follow issue:

Running [/home/runner/golangci-lint-1.45.0-linux-amd64/golangci-lint run --out-format=github-actions --verbose] in [] ...
  panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
  
  goroutine 1 [running]:
  github.com/go-critic/go-critic/checkers.init.22()
  	github.com/go-critic/[email protected]/checkers/embedded_rules.go:46 +0x4b4
  
  Error: golangci-lint exit with code 2
  Ran golangci-lint in 10051ms

and fix the follow error to using gofmt -s -w *.go

  Running [/home/runner/golangci-lint-1.48.0-linux-amd64/golangci-lint run --out-format=github-actions --verbose] in [] ...
  Error: File is not `gofmt`-ed with `-s` (gofmt)
  Error: File is not `gofmt`-ed with `-s` (gofmt)
  Error: File is not `gofmt`-ed with `-s` (gofmt)
  Error: directive `// nolint: errcheck` should be written without leading space as `//nolint: errcheck` (nolintlint)
  Error: directive `// nolint: errcheck` should be written without leading space as `//nolint: errcheck` (nolintlint)
  Error: directive `// nolint: errcheck` should be written without leading space as `//nolint: errcheck` (nolintlint)

@thinkerou thinkerou changed the title fix golangci-lint error chore: upgrade golangci-lint and fix golangci-lint error Aug 15, 2022
@codecov
Copy link

codecov bot commented Aug 15, 2022

Codecov Report

Merging #3278 (c0de9c0) into master (ad66d9d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3278   +/-   ##
=======================================
  Coverage   98.36%   98.36%           
=======================================
  Files          42       42           
  Lines        3124     3124           
=======================================
  Hits         3073     3073           
  Misses         38       38           
  Partials       13       13           
Flag Coverage Δ
98.36% <100.00%> (ø)
go-1.15 98.36% <100.00%> (ø)
go-1.16 ∅ <ø> (?)
go-1.17 98.27% <100.00%> (ø)
go-1.18 98.27% <100.00%> (ø)
macos-latest 98.36% <100.00%> (ø)
ubuntu-latest 98.36% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
errors.go 100.00% <ø> (ø)
mode.go 100.00% <ø> (ø)
path.go 100.00% <ø> (ø)
routergroup.go 100.00% <ø> (ø)
context.go 98.46% <100.00%> (ø)
recovery.go 98.07% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@thinkerou
Copy link
Member Author

@appleboy please review, thanks!

@appleboy appleboy merged commit b04917c into master Aug 15, 2022
@thinkerou thinkerou deleted the fix_check_style_issue branch August 16, 2022 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants