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

x/staking: remove alias.go usage #6397

Merged
merged 6 commits into from
Jun 12, 2020
Merged

Conversation

dauTT
Copy link
Contributor

@dauTT dauTT commented Jun 10, 2020

Description

This PR closes a sub task in #6311


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • 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

@codecov
Copy link

codecov bot commented Jun 10, 2020

Codecov Report

Merging #6397 into master will not change coverage.
The diff coverage is 70.45%.

@@           Coverage Diff           @@
##           master    #6397   +/-   ##
=======================================
  Coverage   55.66%   55.66%           
=======================================
  Files         465      465           
  Lines       27674    27674           
=======================================
  Hits        15404    15404           
  Misses      11169    11169           
  Partials     1101     1101           

simapp/app.go Outdated
@@ -36,6 +36,9 @@ import (
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure these changes are formatted correctly. You can run goimports manually or, preferably, run make fmt

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, just run:

git config core.hooksPath contrib/githooks

The git pre-commit hook will fix code formatting for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Alexander,
both gofmt, and goimports do not detect any formatting issue. I am using vscode with auto-formatting on save.

In addition the command make fmt does not exist. There is a command make format in the make file which also does not detect any formatting issue.

Do you want me to remove the extra line in the import manually?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh, sorry, I meant make format. Tip, you can use tab to autocomplete.

WRT to formatting, the grouping is what I'm referring to. make format should take care of this for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I said abobe, after running make format nothing happens. The file app.go didn't change at all:

Selection_064

Copy link
Member

@tac0turtle tac0turtle Jun 12, 2020

Choose a reason for hiding this comment

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

Goimport isn't smart enough to recognize this case unfortunately. Could you remove the space manually.

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK. Can you add a changelog entry under API Breaking that says:

- (modules) [\#6311](https://github.com/cosmos/cosmos-sdk/issues/6311) Remove `alias.go` usage

@lgtm-com
Copy link

lgtm-com bot commented Jun 12, 2020

This pull request introduces 2 alerts when merging b8e8ff1 into 9048ffa - view on LGTM.com

new alerts:

  • 1 for Unreachable statement
  • 1 for Expression has no effect

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK

@tac0turtle tac0turtle added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 12, 2020
@mergify mergify bot merged commit 14e3aa1 into cosmos:master Jun 12, 2020
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* x/staking: remove alias.go usage

* Fix formatting and Add entry in CHANGELOG.md

* Add missing end curly parenthesis

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/staking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants