Skip to content

lint: fix spelling to American english#6077

Merged
cmwaters merged 2 commits intomasterfrom
callum/spelling
Feb 11, 2021
Merged

lint: fix spelling to American english#6077
cmwaters merged 2 commits intomasterfrom
callum/spelling

Conversation

@cmwaters
Copy link
Contributor

@cmwaters cmwaters commented Feb 10, 2021

Closes: #6030

@cmwaters cmwaters marked this pull request as ready for review February 10, 2021 17:59
@cmwaters cmwaters added the T:breaking Type: Breaking Change label Feb 10, 2021
@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #6077 (5c860ea) into master (26fd158) will increase coverage by 0.22%.
The diff coverage is 36.11%.

@@            Coverage Diff             @@
##           master    #6077      +/-   ##
==========================================
+ Coverage   60.76%   60.99%   +0.22%     
==========================================
  Files         275      275              
  Lines       25345    25345              
==========================================
+ Hits        15401    15459      +58     
+ Misses       8341     8294      -47     
+ Partials     1603     1592      -11     
Impacted Files Coverage Δ
abci/types/result.go 23.07% <ø> (ø)
cmd/tendermint/commands/init.go 4.00% <ø> (ø)
cmd/tendermint/commands/light.go 16.55% <ø> (ø)
consensus/replay.go 71.78% <0.00%> (ø)
consensus/state.go 68.10% <ø> (+0.18%) ⬆️
crypto/secp256k1/secp256k1.go 71.11% <ø> (ø)
libs/bytes/bytes.go 52.00% <ø> (ø)
libs/pubsub/pubsub.go 84.02% <ø> (ø)
light/store/db/db.go 58.50% <0.00%> (ø)
p2p/netaddress.go 50.81% <0.00%> (ø)
... and 33 more

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 -- curious, why is this breaking?

@tessr
Copy link
Contributor

tessr commented Feb 10, 2021

I think because it renames the "behaviour" package. Maybe we should walk all of this back for now; I did not mean to trigger all of this with the linter addition

@alexanderbez
Copy link
Contributor

Ahhh, right! That's pretty unfortunate. Well do we rip the bandaid off now or just never do it?

@cmwaters
Copy link
Contributor Author

I believe the behaviour package will most likely be made redundant by the p2p refactor which should define it's own way of handling peers. Also this package is currently only used by the v2 blockchain reactor

@tessr
Copy link
Contributor

tessr commented Feb 11, 2021

If it's only used by the blockchain v2 reactor, maybe it's OK to rip the bandaid off...

@cmwaters
Copy link
Contributor Author

It's all internal (or at least should be) to v2 so maybe we could actually make it internal and move the behavior stuff into the v2 reactor. Then at a later point if we decide to integrate other reactors with the peer manager we can slide out the behavior stuff for the new system

@tessr
Copy link
Contributor

tessr commented Feb 11, 2021

Okay. Down the hatch! Let's do it!

@cmwaters cmwaters self-assigned this Feb 11, 2021
@tessr
Copy link
Contributor

tessr commented Feb 11, 2021

I think this merits a changelog entry as well.

@cmwaters cmwaters changed the title lint: correct spelling to US english blockchain/v2: internalize behavior package and fix spelling to American English Feb 11, 2021
// Reporter provides an interface for reactors to report the behaviour
// Reporter provides an interface for reactors to report the behavior
// of peers synchronously to other components.
type Reporter interface {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are still publicly exposed interfaces. Should I make them private?

Copy link
Contributor

Choose a reason for hiding this comment

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

If they're moved into internal, it won't matter I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah right but it isn't in an internal folder. I've just moved it to be a part of the blockchain/v2 package

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems we have two options (assuming they're only used within blockchain v2):

  1. Use an internal package and keep it exported
  2. Make these types private

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup. What's your preference?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have none, but keep in mind:

Option (1):

  • leans towards the approach we're ultimately going to take towards Tendermint 1.0, so it's more "idiomatic"
  • the PR diff will be larger, but I guess this isn't a big deal

Option (2):

  • probably less work for you
  • smaller PR diff

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do Option 1, but as a separate PR from all these spelling changes. I can revert the linter change if it's causing trouble between now and then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool shall I revert the last couple of commits and we get this in as the lint pleaser PR and then I will open a new one internalizing the behavior package

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep. I'll remove the linter in a separate PR as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think you will need to

@cmwaters cmwaters changed the title blockchain/v2: internalize behavior package and fix spelling to American English lint: fix spelling to American english Feb 11, 2021
@cmwaters
Copy link
Contributor Author

So apart from the behavior package the only "code" thing we are changing is renaming the Subscription method in libs/pubsub/ from Cancelled to Canceled. This shouldn't be a problem (famous last words)

@cmwaters cmwaters merged commit 162f67c into master Feb 11, 2021
@cmwaters cmwaters deleted the callum/spelling branch February 11, 2021 17:59
@tessr
Copy link
Contributor

tessr commented Feb 11, 2021

@cmwaters can you also add a changelog pending entry for the renamed code?

@cmwaters
Copy link
Contributor Author

Done it here: #6100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T:breaking Type: Breaking Change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize (standardise) our spelling of "misbehavio(u)r"

4 participants