fix: lint and gosec #41

Merged
0xmuralik merged 14 commits from murali/fix-lint into murali/tendermint-rollback 2022-10-18 10:46:37 +00:00
0xmuralik commented 2022-10-17 11:05:40 +00:00 (Migrated from github.com)

Description

Fix lint errors in roolback PR
https://github.com/cerc-io/laconicd/pull/38


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
## Description Fix lint errors in roolback PR https://github.com/cerc-io/laconicd/pull/38 ______ For contributor use: - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer ______ For admin use: - [ ] Added appropriate labels to PR (ex. `WIP`, `R4R`, `docs`, etc) - [ ] Reviewers assigned - [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr))
codecov-commenter commented 2022-10-17 11:57:12 +00:00 (Migrated from github.com)

Codecov Report

Merging #41 (5ae3bc8) into murali/tendermint-rollback (d35d3c0) will increase coverage by 0.09%.
The diff coverage is 81.46%.

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##           murali/tendermint-rollback      #41      +/-   ##
==============================================================
+ Coverage                       58.18%   58.28%   +0.09%     
==============================================================
  Files                             142      142              
  Lines                           15582    15561      -21     
==============================================================
+ Hits                             9066     9069       +3     
+ Misses                           6177     6154      -23     
+ Partials                          339      338       -1     
Impacted Files Coverage Δ
app/ante/handler_options.go 79.45% <0.00%> (ø)
app/utils.go 70.58% <ø> (ø)
ethereum/eip712/eip712.go 0.00% <ø> (ø)
types/account.go 26.31% <ø> (ø)
x/auction/genesis.go 0.00% <0.00%> (ø)
x/auction/keeper/msg_server.go 2.53% <ø> (ø)
x/auction/module.go 0.00% <ø> (ø)
x/bond/keeper/msg_server.go 2.00% <0.00%> (ø)
x/evm/keeper/state_transition.go 77.03% <0.00%> (ø)
x/evm/module.go 52.05% <ø> (ø)
... and 27 more
# [Codecov](https://codecov.io/gh/cerc-io/laconicd/pull/41?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report > Merging [#41](https://codecov.io/gh/cerc-io/laconicd/pull/41?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (5ae3bc8) into [murali/tendermint-rollback](https://codecov.io/gh/cerc-io/laconicd/commit/d35d3c07161fc8421280d1e3737fbf8eacc6757b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (d35d3c0) will **increase** coverage by `0.09%`. > The diff coverage is `81.46%`. <details><summary>Additional details and impacted files</summary> [![Impacted file tree graph](https://codecov.io/gh/cerc-io/laconicd/pull/41/graphs/tree.svg?width=650&height=150&src=pr&token=5tWmn7LxfO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)](https://codecov.io/gh/cerc-io/laconicd/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) ```diff @@ Coverage Diff @@ ## murali/tendermint-rollback #41 +/- ## ============================================================== + Coverage 58.18% 58.28% +0.09% ============================================================== Files 142 142 Lines 15582 15561 -21 ============================================================== + Hits 9066 9069 +3 + Misses 6177 6154 -23 + Partials 339 338 -1 ``` | [Impacted Files](https://codecov.io/gh/cerc-io/laconicd/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [app/ante/handler\_options.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YXBwL2FudGUvaGFuZGxlcl9vcHRpb25zLmdv) | `79.45% <0.00%> (ø)` | | | [app/utils.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YXBwL3V0aWxzLmdv) | `70.58% <ø> (ø)` | | | [ethereum/eip712/eip712.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZXRoZXJldW0vZWlwNzEyL2VpcDcxMi5nbw==) | `0.00% <ø> (ø)` | | | [types/account.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-dHlwZXMvYWNjb3VudC5nbw==) | `26.31% <ø> (ø)` | | | [x/auction/genesis.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-eC9hdWN0aW9uL2dlbmVzaXMuZ28=) | `0.00% <0.00%> (ø)` | | | [x/auction/keeper/msg\_server.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-eC9hdWN0aW9uL2tlZXBlci9tc2dfc2VydmVyLmdv) | `2.53% <ø> (ø)` | | | [x/auction/module.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-eC9hdWN0aW9uL21vZHVsZS5nbw==) | `0.00% <ø> (ø)` | | | [x/bond/keeper/msg\_server.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-eC9ib25kL2tlZXBlci9tc2dfc2VydmVyLmdv) | `2.00% <0.00%> (ø)` | | | [x/evm/keeper/state\_transition.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-eC9ldm0va2VlcGVyL3N0YXRlX3RyYW5zaXRpb24uZ28=) | `77.03% <0.00%> (ø)` | | | [x/evm/module.go](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-eC9ldm0vbW9kdWxlLmdv) | `52.05% <ø> (ø)` | | | ... and [27 more](https://codecov.io/gh/cerc-io/laconicd/pull/41/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | </details>
github-code-scanning[bot] (Migrated from github.com) reviewed 2022-10-18 09:44:21 +00:00
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 09:44:21 +00:00

Implicit memory aliasing in for loop.

Implicit memory aliasing in for loop.

Show more details

## Implicit memory aliasing in for loop. Implicit memory aliasing in for loop. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/388)
@ -33,2 +32,4 @@
// #nosec G601
genesisAuctions = append(genesisAuctions, &auction) //nolint: all
}
return types.GenesisState{Params: params, Auctions: genesisAuctions}
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 09:44:20 +00:00

Implicit memory aliasing in for loop.

Implicit memory aliasing in for loop.

Show more details

## Implicit memory aliasing in for loop. Implicit memory aliasing in for loop. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/387)
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 09:44:20 +00:00

Implicit memory aliasing in for loop.

Implicit memory aliasing in for loop.

Show more details

## Implicit memory aliasing in for loop. Implicit memory aliasing in for loop. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/386)
github-code-scanning[bot] (Migrated from github.com) reviewed 2022-10-18 10:10:51 +00:00
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:51 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/395)
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:51 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/394)
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:51 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/393)
@ -377,3 +377,3 @@
data, err := ioutil.ReadFile(filePath)
data, err := ioutil.ReadFile(filePath) // #nosec G304
if err != nil {
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:50 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/392)
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:50 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/391)
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:50 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/390)
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:10:50 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/389)
github-code-scanning[bot] (Migrated from github.com) reviewed 2022-10-18 10:18:13 +00:00
github-code-scanning[bot] (Migrated from github.com) commented 2022-10-18 10:18:13 +00:00

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.

Show more details

## Returned error is not propagated up the stack. Returned error is not propagated up the stack. [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/396)
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconicd#41
No description provided.