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

Fix issues reported by staticcheck in tests #26

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

shane-ns1
Copy link

@shane-ns1 shane-ns1 commented Oct 26, 2023

Fixes #25

This PR resolves all of the issues reported by the staticcheck tool in tests.

I think it's mostly boring, except possibly this removed code in BenchmarkTxn_Sub_abort():

                for i := 0; i < b.N; i++ {
                        txn.Sub(func(txn *Txn) (err error) { return e })
-                       if e == nil {
-                       }
                }

I'm not really sure what the intention is, since e never changes. If the idea was to add some actual check, it was never added...

Copy link
Member

@wojas wojas left a comment

Choose a reason for hiding this comment

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

Thanks, this all looks better or harmless and does clean things up!

@wojas wojas merged commit 2b2b787 into PowerDNS:master Oct 31, 2023
4 checks passed
@wojas wojas added this to the v1.9.2 milestone Dec 7, 2023
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.

staticcheck reports issues in tests
2 participants