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

lint: enable staticcheck for test code and fix issues #5401

Merged
merged 3 commits into from Jun 3, 2023

Conversation

cce
Copy link
Contributor

@cce cce commented May 19, 2023

Summary

The staticcheck linter is one of the golangci-lint linters enabled by default that provides a wide range of advice; this PR enables it for test code and fixes the handful of issues it raised.

Test Plan

Existing tests should pass.

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #5401 (9b18171) into master (3cbb422) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5401      +/-   ##
==========================================
- Coverage   55.38%   55.35%   -0.03%     
==========================================
  Files         447      447              
  Lines       63312    63312              
==========================================
- Hits        35063    35045      -18     
- Misses      25857    25870      +13     
- Partials     2392     2397       +5     

see 7 files with indirect coverage changes

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

algorandskiy
algorandskiy previously approved these changes May 19, 2023
@algorandskiy
Copy link
Contributor

@cce please resolve conflicts

@@ -662,7 +662,7 @@ func BenchmarkBuildVerify(b *testing.B) {
sig, err := signerInRound.SignBytes(data[:])
require.NoError(b, err, "failed to create keys")

partkeys = append(partkeys, signer)
//partkeys = append(partkeys, signer)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not completely remove this line?

@cce cce merged commit 45cf9ab into algorand:master Jun 3, 2023
24 checks passed
@cce cce deleted the enable-staticcheck-test-linter branch June 3, 2023 00:35
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

3 participants