Skip to content

Commit 98cf72c

Browse files
augchan42ryanchristoamaury1093mergify[bot]
authored
style: fix lint errors and update lint timeout (#9464)
* fix: misc fixes for make to work off freshly cloned repo * gocritic appendAssign fix * markdown trailing space and blank line fixes * change golangci-lint timeout to 5min * update changelog * Update .golangci.yml Co-authored-by: Ryan Christoffersen <[email protected]> * Update CHANGELOG.md Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 37fc37d commit 98cf72c

File tree

7 files changed

+9
-11
lines changed

7 files changed

+9
-11
lines changed

.golangci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
run:
22
tests: false
3-
# # timeout for analysis, e.g. 30s, 5m, default is 1m
4-
# timeout: 5m
3+
# timeout for analysis, e.g. 30s, 5m, default is 1m
4+
timeout: 5m
55

66
linters:
77
disable-all: true

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
3636

3737
## [Unreleased]
3838

39+
* [\#9460](https://github.com/cosmos/cosmos-sdk/pull/9460) Fix lint error in `MigratePrefixAddress`.
3940
* [\#9428](https://github.com/cosmos/cosmos-sdk/pull/9428) Optimize bank InitGenesis. Removed bank keeper's `k.setBalances` and `k.clearBalances`. Added `k.initBalances`.
4041
* [\#9231](https://github.com/cosmos/cosmos-sdk/pull/9231) Remove redundant staking errors.
4142
* [\#9205](https://github.com/cosmos/cosmos-sdk/pull/9205) Improve readability in `abci` handleQueryP2P

client/docs/statik/statik.go

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/DOC_WRITING_GUIDELINES.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
+ Follow Google developer documentation [style guide](https://developers.google.com/style).
1010
+ 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!).
1111

12-
13-
1412
## Technical Writing Course
1513

1614
Google provides a free [course](https://developers.google.com/tech-writing/overview) for technical writing.

docs/core/encoding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ The above `Profile` example is a fictive example used for educational purposes.
198198
- the `AccountI` interface for encodinig different types of accounts (similar to the above example) in the x/auth query responses,
199199
- the `Evidencei` interface for encoding different types of evidences in the x/evidence module,
200200
- the `AuthorizationI` interface for encoding different types of x/authz authorizations,
201-
- 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.
201+
- 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.
202202

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

server/rosetta/lib/errors/errors_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ func (e *MyError) Error() string {
6565
}
6666
func (e *MyError) Is(err error) bool {
6767
return true
68-
}
68+
}

x/distribution/legacy/v043/helpers.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ func MigratePrefixAddress(store sdk.KVStore, prefixBz []byte) {
1919

2020
for ; oldStoreIter.Valid(); oldStoreIter.Next() {
2121
addr := oldStoreIter.Key()
22-
newStoreKey := append(prefixBz, address.MustLengthPrefix(addr)...)
22+
var newStoreKey []byte = prefixBz
23+
newStoreKey = append(newStoreKey, address.MustLengthPrefix(addr)...)
2324

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

0 commit comments

Comments
 (0)