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

*: add nolint comments to multiple errors wrapping #2933

Merged
merged 1 commit into from
Mar 15, 2023
Merged

Conversation

AnnaShaleva
Copy link
Member

Problem

Failing Linter job, see :

 Error: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)

Due to a set of places where multiple errors should be wrapped. However, multiple errors wrapping is a part of go 1.20, thus we can't use it now.

Solution

Explicitly specify go version (although it should be fetched from environment anyway).

@AnnaShaleva
Copy link
Member Author

OK, this doesn't help. I'm not sure, maybe something is wrong with the linter itself.

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #2933 (5f6c013) into master (1db90e5) will decrease coverage by 0.10%.
The diff coverage is 58.62%.

@@            Coverage Diff             @@
##           master    #2933      +/-   ##
==========================================
- Coverage   85.08%   84.99%   -0.10%     
==========================================
  Files         330      330              
  Lines       42463    42463              
==========================================
- Hits        36131    36092      -39     
- Misses       4864     4904      +40     
+ Partials     1468     1467       -1     
Impacted Files Coverage Δ
pkg/core/storage/boltdb_store.go 78.37% <0.00%> (ø)
pkg/services/oracle/network.go 70.96% <0.00%> (ø)
pkg/rpcclient/actor/waiter.go 65.81% <20.00%> (ø)
cli/vm/cli.go 79.31% <50.00%> (ø)
pkg/core/blockchain.go 78.71% <87.50%> (ø)
pkg/core/interop/contract/call.go 73.80% <100.00%> (ø)
pkg/services/oracle/neofs/neofs.go 36.20% <100.00%> (ø)
pkg/vm/stackitem/json.go 96.25% <100.00%> (ø)

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@roman-khimov
Copy link
Member

You can just turn this linter check off for particular lines (there is not a lot of them) + add an issue to remove these lines in future.

@AnnaShaleva AnnaShaleva changed the title workflows: explicitly specify golangci-lint go version *: add nolint comments to multiple errors wrapping Mar 15, 2023
@AnnaShaleva AnnaShaleva force-pushed the fix-linter branch 6 times, most recently from 9a730d1 to 9b324b6 Compare March 15, 2023 13:32
To be enabled after go 1.20 support is added.
@AnnaShaleva AnnaShaleva marked this pull request as ready for review March 15, 2023 13:46
@roman-khimov roman-khimov merged commit 97c7023 into master Mar 15, 2023
@roman-khimov roman-khimov deleted the fix-linter branch March 15, 2023 13:57
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