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

Fix some Revive lint warnings #145

Merged
merged 1 commit into from
Mar 31, 2021
Merged

Conversation

rajat2004
Copy link
Contributor

Continuation of #49

Warnings fixed -

pkg/agent/csock/csock.go
  (60, 2)  https://revive.run/r#unhandled-error  Unhandled error in call to function json.Unmarshal  
  (68, 2)  https://revive.run/r#unhandled-error  Unhandled error in call to function rw.Write 

pkg/util/attime/attime_test.go
  (10, 37)  https://revive.run/r#empty-lines  extra empty line at the start of a bloc

pkg/storage/dict/trie.go   
  (116, 11)  https://revive.run/r#superfluous-else      if block ends with a continue statement, so drop this else and outdent its block  
  (73, 10)   https://revive.run/r#indent-error-flow     if block ends with a return statement, so drop this else and outdent its block

Unified diff is slightly difficult to read, easier to view the split one to ensure nothing has changed

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #145 (9c0a809) into main (2eeedcb) will increase coverage by 2.26%.
The diff coverage is 48.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   55.27%   57.53%   +2.26%     
==========================================
  Files          69       69              
  Lines        2631     2632       +1     
==========================================
+ Hits         1454     1514      +60     
+ Misses       1073      998      -75     
- Partials      104      120      +16     
Impacted Files Coverage Δ
pkg/agent/csock/csock.go 0.00% <0.00%> (ø)
pkg/storage/dict/trie.go 75.00% <58.63%> (-0.86%) ⬇️
pkg/storage/segment/segment.go 92.50% <0.00%> (-4.16%) ⬇️
pkg/analytics/analytics.go 83.34% <0.00%> (-3.03%) ⬇️
pkg/agent/session.go 73.26% <0.00%> (+4.66%) ⬆️
pkg/server/controller.go 25.75% <0.00%> (+25.75%) ⬆️
pkg/server/ingest.go 66.04% <0.00%> (+66.04%) ⬆️
pkg/server/stats.go 66.67% <0.00%> (+66.67%) ⬆️

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 a08c100...9c0a809. Read the comment docs.

Copy link
Member

@petethepig petethepig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you @rajat2004 !

@petethepig petethepig merged commit d7ccae6 into grafana:main Mar 31, 2021
@rajat2004 rajat2004 deleted the fix-warnings branch March 31, 2021 01:56
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.

2 participants