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: Improve code quality with new linters #1414

Merged
merged 11 commits into from
Jun 18, 2024
Merged

style: Improve code quality with new linters #1414

merged 11 commits into from
Jun 18, 2024

Conversation

tkxkd0159
Copy link
Member

@tkxkd0159 tkxkd0159 commented Jun 11, 2024

Description

closes: #XXXX

New linter list
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- errchkjson
- errorlint
- tenv
- wastedassign
- fatcontext

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@tkxkd0159 tkxkd0159 changed the title Lint code style: Improve code quality with new linters Jun 11, 2024
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 23.68421% with 58 lines in your changes missing coverage. Please review.

Project coverage is 69.63%. Comparing base (2ed0e6c) to head (7fcec2e).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1414      +/-   ##
==========================================
- Coverage   69.74%   69.63%   -0.12%     
==========================================
  Files         751      751              
  Lines       62259    62055     -204     
==========================================
- Hits        43424    43210     -214     
- Misses      16207    16214       +7     
- Partials     2628     2631       +3     
Files Coverage Δ
client/keys/show.go 81.65% <100.00%> (ø)
crypto/armor.go 87.35% <100.00%> (ø)
crypto/keys/multisig/codec.go 100.00% <ø> (ø)
snapshots/chunk.go 88.23% <100.00%> (ø)
x/auth/ante/sigverify.go 70.60% <100.00%> (ø)
x/auth/vesting/client/testutil/suite.go 100.00% <ø> (ø)
x/authz/client/testutil/grpc.go 97.27% <ø> (-0.05%) ⬇️
x/authz/client/testutil/query.go 100.00% <ø> (ø)
x/authz/client/testutil/tx.go 97.87% <ø> (-0.02%) ⬇️
x/bank/client/testutil/grpc.go 100.00% <ø> (ø)
... and 58 more

... and 1 file with indirect coverage changes

@tkxkd0159 tkxkd0159 self-assigned this Jun 11, 2024
@tkxkd0159 tkxkd0159 force-pushed the lint-code branch 2 times, most recently from d898400 to 18a2a3b Compare June 11, 2024 15:49
@tkxkd0159 tkxkd0159 marked this pull request as ready for review June 18, 2024 08:54
@tkxkd0159 tkxkd0159 requested a review from 170210 June 18, 2024 11:21
simapp/simd/main.go Show resolved Hide resolved
@tkxkd0159 tkxkd0159 merged commit d60e44a into main Jun 18, 2024
37 of 38 checks passed
@tkxkd0159 tkxkd0159 deleted the lint-code branch June 18, 2024 14:53
mergify bot pushed a commit that referenced this pull request Jun 18, 2024
* Use golangci-lint v1.59

* Bump golangci-lint ci from 1.55 to 1.59

* Add useful linters

* Apply copyloopvar

* Apply errchkjson, tenv

* Apply `wastedassign`

* Apply `errorlint`

(cherry picked from commit d60e44a)

# Conflicts:
#	.golangci.yml
#	CHANGELOG.md
#	Makefile
#	server/oc_cmds_test.go
#	server/util_test.go
#	x/foundation/client/testutil/tx.go
tkxkd0159 added a commit that referenced this pull request Jun 19, 2024
tkxkd0159 added a commit that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants