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

style: apply any / all automated lint fixes #15644

Merged
merged 15 commits into from
Mar 31, 2023

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Mar 31, 2023

Description

works towards:


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@faddat faddat requested a review from a team as a code owner March 31, 2023 04:33
@github-prbot github-prbot requested review from a team, facundomedica and tac0turtle and removed request for a team March 31, 2023 04:35
@faddat faddat changed the title make lint-fix style: make lint-fix Mar 31, 2023
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

gosec found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@faddat faddat changed the title style: make lint-fix style: make lint-fix (verified) Mar 31, 2023
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

this is adding linting errors

@faddat
Copy link
Contributor Author

faddat commented Mar 31, 2023

can you elaborate?

it was produced like:

git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk
make lint-fix
git commit -a
gh pr create

Also, I'm not seeing where it would add linter errors -- the nolints it took out, we aren't checking for anymore

@tac0turtle
Copy link
Member

gosec found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

^^^

@faddat
Copy link
Contributor Author

faddat commented Mar 31, 2023

that is in CI somewhere else, not golangci-lint.

Whatever job that is we need to configure it same as linter

That particular CI job seems to be part of githubs code scanning suite

this is gosec g101 1 sec

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

lgtm, small nits

@julienrbrt julienrbrt changed the title style: make lint-fix (verified) style: make lint-fix Mar 31, 2023
@github-actions github-actions bot added the C:CLI label Mar 31, 2023
@faddat
Copy link
Contributor Author

faddat commented Mar 31, 2023

I'm trying to generate the nit fixes, could take a second.

@faddat faddat changed the title style: make lint-fix style: apply any / all automated lint fixes Mar 31, 2023
@faddat
Copy link
Contributor Author

faddat commented Mar 31, 2023

@julienrbrt -- odd thing: If I just save the file in my editor, I end up fixing those nits, but only if they're above a function.

Removing the //nolint:interfacers, surfaced more nits, so one moment, I am nitting them now.

@github-actions github-actions bot added the C:Rosetta Issues and PR related to Rosetta label Mar 31, 2023
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

thank you! just 3 spacing left to remove but all the rest lgtm!

@@ -20,7 +20,7 @@ var (

// NewMsgSend - construct a msg to send coins from one account to another.
//
Copy link
Member

Choose a reason for hiding this comment

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

1

@@ -134,7 +132,7 @@ func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err

// NewMsgDeposit creates a new MsgDeposit instance
//
Copy link
Member

Choose a reason for hiding this comment

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

3 in this file

@@ -45,7 +45,7 @@

func (h Server) Start() error {
h.logger.Info(fmt.Sprintf("Rosetta server listening on add %s", h.addr))
return http.ListenAndServe(h.addr, h.h) //nolint:gosec // users are recommended to operate a proxy in front of this server
return http.ListenAndServe(h.addr, h.h) //nolint:gosec // users are recommended to operate a proxy in front of this server

Check failure

Code scanning / gosec

Use of net/http serve function that has no support for setting timeouts

Use of net/http serve function that has no support for setting timeouts
@julienrbrt julienrbrt merged commit a9546bf into cosmos:main Mar 31, 2023
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.

3 participants