LeastAuthority / althea-net-gravity-private

An internal fork of the Gravity bridge repo for internal work
Apache License 2.0
0 stars 0 forks source link

Returned errors in Go are not checked or are ignored #12

Open dnkolegov opened 2 years ago

dnkolegov commented 2 years ago

Many locations within the ​module​ subdirectory fail to check and handle returned errors and instead ignore them. Failing to check errors makes it difficult to discover or report the source of an error.

Unhandled errors:

A returned error is ignored:

jkilpatr commented 2 years ago

this is very helpful.

what linter did you use to get this list, I would love to add it to our setup.

dnkolegov commented 2 years ago

You can use the following:

Look at this approach also https://github.com/prysmaticlabs/prysm/tree/develop/tools/analyzers