Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In catching up with recent PRs I noticed some churn because
gofmt
has a "simplify" option that removes some superfluous identifiers, but CI does not enforce its use and only some developers have it set. I don't see a way to enforce "not simple" so this PR enforces simple for consistency. This is done by enabling thegofmt
linter in golangci-lint:gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
Developers may choose to add that as well, or just add
-s
to their gofmt flags.This also modifies the the erc20 updatecontract.sh script so that it reorders the imports after rewriting the import lines with perl. Recent PRs have tried to modify contract.go, but since it is generated it should not be touched (except by the script that generates it).