-
Notifications
You must be signed in to change notification settings - Fork 118
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
Implement suggestions from linter #142
Conversation
not agreed as a scope, will be parked |
Will you suggest any fixes for these warnings? We can review it for you. |
config/config.go
Outdated
@@ -149,7 +149,7 @@ func New(env []string) (WatchdogConfig, error) { | |||
return c, fmt.Errorf("HTTP write timeout must be over 0s") | |||
} | |||
|
|||
if len(c.FunctionProcess) == 0 && c.OperationalMode != ModeStatic { |
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.
Why do you feel this is "wrong"?
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.
Both are used in the stdlib
https://stackoverflow.com/questions/18594330/what-is-the-best-way-to-test-for-an-empty-string-in-go
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.
I think you are right, I assumed ASM part to be different but it is the same, will rollback this and ignore this gosimple rule
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.
Added comments, thanks for running this.
/set title: Implement suggestions from linter |
Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project. Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken. 💡 Shall we fix this?This will only take a few moments. First, clone your fork and checkout this branch using the git CLI. Next, set up your real name and email address:
Finally, run one of these commands to add the "Signed-off-by" line to your commits. If you only have one commit so far then run: Check that the message has been added properly by running "git log". |
Signed-off-by: F. Talha Altinel <[email protected]>
closing this as I am working on a less style based linter configuration that only focuses basic style and more of real bugs/issues with eliminated false positives, will probably do a gist and a blog on this as I have been dealing with linter configs for long time |
Signed-off-by: F. Talha Altinel [email protected]
Description
I have run golangci-lint v1.49.0 and used this config to eliminate false positives
Motivation and Context
raised under Suggestion: Implement Go linting #55
How Has This Been Tested?
no this is not tested yet
Types of changes
Checklist:
git commit -s
Additional Note
I have found these errors as well but due to my limited knowledge, I didn't take action on these to not break the repository.
Would be cool to discuss it after this PR change