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

chore(lint): check each //nolint and improve them #2047

Merged
merged 15 commits into from
Nov 23, 2021
Merged

Conversation

qdm12
Copy link
Contributor

@qdm12 qdm12 commented Nov 17, 2021

Changes

  • Remove unneeded //nolint comments
  • Fix some of the lint-ignored errors
  • Specify a linter that should be ignored as //nolint:lintername
  • Add nolintlint linter to detect future unused //nolint comments
  • Move exclude rules from golangci.yml to inlined //nolint so nolintlint can pick them up.

The idea behind those changes was to find potential code issues that could be the root of the memory issue

Tests

golangci-lint run

Issues

Primary Reviewer

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #2047 (ca119e7) into development (0bc4bf1) will increase coverage by 0.29%.
The diff coverage is 70.51%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2047      +/-   ##
===============================================
+ Coverage        59.94%   60.23%   +0.29%     
===============================================
  Files              185      194       +9     
  Lines            26343    26589     +246     
===============================================
+ Hits             15790    16016     +226     
- Misses            8677     8692      +15     
- Partials          1876     1881       +5     
Flag Coverage Δ
unit-tests 60.23% <70.51%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/gossamer/profile.go 0.00% <0.00%> (ø)
cmd/gossamer/toml_config.go 27.27% <0.00%> (ø)
dot/config.go 26.63% <0.00%> (-1.59%) ⬇️
dot/network/block_announce.go 66.10% <ø> (ø)
dot/network/light.go 85.35% <ø> (ø)
dot/network/message.go 69.26% <0.00%> (-2.49%) ⬇️
dot/network/message_cache.go 66.66% <ø> (ø)
dot/network/stream_manager.go 92.68% <ø> (ø)
dot/network/sync.go 5.26% <0.00%> (ø)
dot/network/transaction.go 61.97% <ø> (ø)
... and 192 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6a6ea4...ca119e7. Read the comment docs.

.golangci.yml Show resolved Hide resolved
@qdm12 qdm12 merged commit ca921ce into development Nov 23, 2021
@qdm12 qdm12 deleted the qdm12-mem-nolint branch November 23, 2021 15:46
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

timwu20 pushed a commit to timwu20/gossamer that referenced this pull request Dec 6, 2021
- remove unneeded `//nolint` comments
- fix some of the lint-ignored errors
- specify a linter that should be ignored as `//nolint:lintername`
- add `nolintlint` linter to detect future unused `//nolint` comments
- move exclude rules from golangci.yml to inlined `//nolint` so `nolintlint` can pick them up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants