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
Update code to fix almost all pre-existing lint errors #2008
Commits on Feb 24, 2020
-
Cleanup linting errors around deadcode
To be specific ineffassign, deadcode and unused errors Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 0fc660e - Browse repository at this point
Copy the full SHA 0fc660eView commit details -
Replaced by keysFn and if the config defines it then it will distribute
keys using hashing Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 43520a2 - Browse repository at this point
Copy the full SHA 43520a2View commit details -
Hold over from when readBatch as also the iterator
Now that we have an iterator there is no need to also have a consumed bool on the underlying object. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for c3564f3 - Browse repository at this point
Copy the full SHA c3564f3View commit details -
Necessary to fix the false sharing problem
Will never actually be used. Only necessary to pad out CPU cache lines. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 782bd54 - Browse repository at this point
Copy the full SHA 782bd54View commit details -
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 18d997f - Browse repository at this point
Copy the full SHA 18d997fView commit details -
Cleanup all gosimple suggestions
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for a60dcbb - Browse repository at this point
Copy the full SHA a60dcbbView commit details -
Attempted not to change any existing logic so if an error was ignored we will now either explicitly ignore it or in the case of a goroutine being called with a func that is ignoring the error we will just put a //noling:errcheck on that line. If it was in a test case we went ahead and did the extra assertion checks b/c its always good to know where something might have errored in your test cases. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 2a3a929 - Browse repository at this point
Copy the full SHA 2a3a929View commit details -
Fix most staticcheck lint issues
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for e77ea36 - Browse repository at this point
Copy the full SHA e77ea36View commit details -
Cleanup deprecated call to snappy.NewWriter
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 62b7efd - Browse repository at this point
Copy the full SHA 62b7efdView commit details -
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for ff69505 - Browse repository at this point
Copy the full SHA ff69505View commit details -
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for b666336 - Browse repository at this point
Copy the full SHA b666336View commit details -
We have opened up issue cortexproject#2015 to address the deprecation of this type. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for fb4161c - Browse repository at this point
Copy the full SHA fb4161cView commit details -
Explicitly ignoring this error
The test is currently failing due to a data race. I believe it is due to this bug in golang. golang/go#30597 As far as this test cares it does not really matter that this happens so removing the need to check for NoError "fixes" it. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for ac3f181 - Browse repository at this point
Copy the full SHA ac3f181View commit details -
Require noerror since this is a test
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for e8413ff - Browse repository at this point
Copy the full SHA e8413ffView commit details -
Switch over to use require.NoError
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 9bfd5ef - Browse repository at this point
Copy the full SHA 9bfd5efView commit details -
Move func to test class since that is only place it was used
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 2dd3252 - Browse repository at this point
Copy the full SHA 2dd3252View commit details -
Log warning if save to cache errors
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 4dfa046 - Browse repository at this point
Copy the full SHA 4dfa046View commit details -
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for a8e0f53 - Browse repository at this point
Copy the full SHA a8e0f53View commit details -
Use returned error instead of capturing it
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 0e81880 - Browse repository at this point
Copy the full SHA 0e81880View commit details -
Bringing back ctx and adding comment
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 4d3838f - Browse repository at this point
Copy the full SHA 4d3838fView commit details -
Log error if changing ring state fails when Leaving
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for c8e8f56 - Browse repository at this point
Copy the full SHA c8e8f56View commit details -
If context deadline exceeded return the error
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for aa2ecc6 - Browse repository at this point
Copy the full SHA aa2ecc6View commit details -
Can't defer this otherwise we will have no data
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 5d857af - Browse repository at this point
Copy the full SHA 5d857afView commit details -
Comment to make it clear why this nolint was added
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for f48805a - Browse repository at this point
Copy the full SHA f48805aView commit details -
Since Fixture is already in testutils and it is being used in both places pulled it out into a common helper method in the testutils package. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 6e5b06f - Browse repository at this point
Copy the full SHA 6e5b06fView commit details -
io.Copy added to global errcheck exclude
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for f910457 - Browse repository at this point
Copy the full SHA f910457View commit details -
If error dont do anything else
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 7d4ef02 - Browse repository at this point
Copy the full SHA 7d4ef02View commit details -
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for eea746e - Browse repository at this point
Copy the full SHA eea746eView commit details -
Adding tracer to global excludes
Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 71c71e2 - Browse repository at this point
Copy the full SHA 71c71e2View commit details -
Formatting and import issues that got missed when merging. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for 2e09e2c - Browse repository at this point
Copy the full SHA 2e09e2cView commit details -
Ratelimiter returns resource exhausted error
This is necessary so that when it is used with the backoff retry it will allow for the backoff to continue to work as expected. Signed-off-by: Nathan Zender <github@nathanzender.com>
Configuration menu - View commit details
-
Copy full SHA for fec6e23 - Browse repository at this point
Copy the full SHA fec6e23View commit details