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 <12519942+ryanchristo@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>

Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Augustin Chan 2021-06-08 12:27:39 -04:00 committed by GitHub
parent 37fc37d853
commit 98cf72c4ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 11 deletions

View File

@ -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
linters:
disable-all: true

View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -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.

View File

@ -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)...)
// Set new key on store. Values don't change.
store.Set(newStoreKey, oldStoreIter.Value())