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: fix lint errors and update lint timeout #9464

Merged
merged 7 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run:
tests: false
# # timeout for analysis, e.g. 30s, 5m, default is 1m
# timeout: 5m
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m
augchan42 marked this conversation as resolved.
Show resolved Hide resolved

linters:
disable-all: true
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

* [\#9460](https://github.com/cosmos/cosmos-sdk/pull/9460) Fix lint error in `MigratePrefixAddress`.
* [\#9428](https://github.com/cosmos/cosmos-sdk/pull/9428) Optimize bank InitGenesis. Removed bank keeper's `k.setBalances` and `k.clearBalances`. Added `k.initBalances`.
* [\#9231](https://github.com/cosmos/cosmos-sdk/pull/9231) Remove redundant staking errors.
* [\#9205](https://github.com/cosmos/cosmos-sdk/pull/9205) Improve readability in `abci` handleQueryP2P
Expand Down
6 changes: 2 additions & 4 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/DOC_WRITING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
+ Follow Google developer documentation [style guide](https://developers.google.com/style).
+ Check the meaning of words in Microsoft's [A-Z word list and term collections](https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms) (use the search input!).



## Technical Writing Course

Google provides a free [course](https://developers.google.com/tech-writing/overview) for technical writing.
2 changes: 1 addition & 1 deletion docs/core/encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ The above `Profile` example is a fictive example used for educational purposes.
- the `AccountI` interface for encodinig different types of accounts (similar to the above example) in the x/auth query responses,
- the `Evidencei` interface for encoding different types of evidences in the x/evidence module,
- the `AuthorizationI` interface for encoding different types of x/authz authorizations,
- the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/x/staking/types/staking.pb.go#L306-L337) struct that contains information about a validator.
- the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/x/staking/types/staking.pb.go#L306-L337) struct that contains information about a validator.

A real-life example of encoding the pubkey as `Any` inside the Validator struct in x/staking is shown in the following example:

Expand Down
2 changes: 1 addition & 1 deletion server/rosetta/lib/errors/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ func (e *MyError) Error() string {
}
func (e *MyError) Is(err error) bool {
return true
}
}
3 changes: 2 additions & 1 deletion x/distribution/legacy/v043/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ func MigratePrefixAddress(store sdk.KVStore, prefixBz []byte) {

for ; oldStoreIter.Valid(); oldStoreIter.Next() {
addr := oldStoreIter.Key()
newStoreKey := append(prefixBz, address.MustLengthPrefix(addr)...)
var newStoreKey []byte = prefixBz
newStoreKey = append(newStoreKey, address.MustLengthPrefix(addr)...)
augchan42 marked this conversation as resolved.
Show resolved Hide resolved

// Set new key on store. Values don't change.
store.Set(newStoreKey, oldStoreIter.Value())
Expand Down