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: investigate static-analysis tool to make sure all iterators are closed #2414

Open
Tracked by #4620
p0mvn opened this issue Aug 15, 2022 · 2 comments
Open
Tracked by #4620

Comments

@p0mvn
Copy link
Member

p0mvn commented Aug 15, 2022

Background

We need a static analysis tool to detect iterators that were not closed.

Example problem:

iterator := prefixStore.Iterator(nil, nil)

Suggested Approach

Acceptance Criteria

  • find a concrete way to integrate a check for ensuring that all iterators are closed into our repository
  • write a follow-up issue with concrete steps needed to be done
@ValarDragon
Copy link
Member

I feel like this has to be something handled within gosec

@faddat
Copy link
Member

faddat commented Aug 16, 2022

So, I can think of 2-3 ways to do it, but in our internal chat, I started here:

https://github.com/crypto-com/cosmos-sdk-codeql

there's also:

https://github.com/informalsystems/gosec

but in general, the crypto.com tooling has replaced the informalsysstems/gosec repo in our code practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕒
Development

No branches or pull requests

4 participants