-
Notifications
You must be signed in to change notification settings - Fork 189
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
add lane with static checks #288
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ad11409
to
76698dd
Compare
Makes gofmt happy. Signed-off-by: Francesco Romani <[email protected]>
76698dd
to
51fecde
Compare
Closed
Signed-off-by: Francesco Romani <[email protected]>
51fecde
to
08c93f3
Compare
according to golint-ci, and confirmed by `git grep`, this code was lingering around unused. Let's get rid of it. Signed-off-by: Francesco Romani <[email protected]>
Mechanical simplifications as suggested by the tool. Signed-off-by: Francesco Romani <[email protected]>
08c93f3
to
350148b
Compare
Let's not swallow errors, even if they are unlikely. This makes the troubleshooting experience a bit easier with very tiny extra maintenance cost. Signed-off-by: Francesco Romani <[email protected]>
It's test code, we can afford a little extra ugliness to make the lint happy. Signed-off-by: Francesco Romani <[email protected]>
350148b
to
a2b7ed8
Compare
Let's not lose teardown errors completely. We cannot really recover from teardown errors in `context.Do()`, but we can at least trace them to enable some troubleshooting. Signed-off-by: Francesco Romani <[email protected]>
The documentation of the callback (WalkFunc) of `filepath.Walk` reads like: The err argument reports an error related to path, signaling that Walk will not walk into that directory. The function can decide how to handle that error; as described earlier, returning the error will cause Walk to stop walking the entire tree. Here we want to always keep walking, and this is why we ignored the argument. We still want to do this, so let's rename the argument to signal the intent of the code, and to avoid unwanted shadowing with the local variable. Signed-off-by: Francesco Romani <[email protected]>
let's add tier-0 (static check) lanes, starting with the lint lane featuring golang-ci lint Signed-off-by: Francesco Romani <[email protected]>
a2b7ed8
to
1979b8e
Compare
jaypipes
approved these changes
Nov 19, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet :) thanks Francesco!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add gh actions lane to run static code checks:
golangci-lint
go fmt
Fixes: #51