masa-finance / masa-oracle

Masa Oracle: Decentralized Data Protocol 🌐
https://developers.masa.ai/docs/masa-protocol/welcome
MIT License
24 stars 19 forks source link

chore(all): Cleanup and linting #623

Closed mcamou closed 2 weeks ago

mcamou commented 2 weeks ago

Description

This PR cleans up some of the things I've been finding while getting familiar with the code:

Notes for Reviewers

Most of the changes have to do with getting golangci-lint to pass.

The PR is failing codecov because a lot of the changes involved adding if err != nil { return err, nil } or if err != nil { log(err) } to satisfy golangci-lint (and because it's a good practice). However, these are complicated to test without making the PR even bigger, since they will usually need some refactoring to become testable.

Signed commits

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 7.21649% with 90 lines in your changes missing coverage. Please review.

Project coverage is 8.87%. Comparing base (119f740) to head (ffac52b). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/masa-node-cli/handlers.go 0.00% 31 Missing :warning:
node/oracle_node.go 0.00% 18 Missing :warning:
pkg/chain/chain.go 0.00% 8 Missing :warning:
pkg/llmbridge/sentiment.go 0.00% 7 Missing :warning:
pkg/api/handlers_node.go 0.00% 6 Missing :warning:
pkg/db/operations.go 0.00% 6 Missing :warning:
cmd/masa-node/main.go 0.00% 5 Missing :warning:
pkg/scrapers/twitter/followers.go 0.00% 5 Missing :warning:
pkg/scrapers/web/web.go 40.00% 2 Missing and 1 partial :warning:
pkg/event/event_client.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #623 +/- ## ======================================== - Coverage 8.89% 8.87% -0.02% ======================================== Files 99 99 Lines 7800 7761 -39 ======================================== - Hits 694 689 -5 + Misses 7032 6998 -34 Partials 74 74 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in

github-actions[bot] commented 2 weeks ago

PR description is too short and seems to not fulfill PR template, please fill in