-
Notifications
You must be signed in to change notification settings - Fork 366
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
Added staticcheck
for basic static code analysis
#44
Conversation
Enabling comment style checks
@@ -67,14 +67,14 @@ func start() error { | |||
return showToken() | |||
} else { | |||
flag.Usage() | |||
return fmt.Errorf("None of the required flags are present. What do you want me to do?") | |||
return fmt.Errorf("none of the required flags are present. What do you want me to do?") |
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.
Can we consider this a non-breaking change? personally I fully agree with correcting this style but this will break user tests that perform assertions against the explicit error values. Considering this goes for v4, we can consider it a non-issue but I would think twice if we ever need to backport to v3
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.
Since it is in the actual jwt
application, I would say that this is ok. For the other error changes I would assume that people are trying to compare against the error variables and not the content. But anyway, yes, I would keep this for v4 only, which promises compatibility but considering it to be a major version bump, I would argue this has enough leeway to fix issues like this.
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.
LGTM (the above comment can be a separate thread)
Additionally, added `staticcheck` for basic static code analysis (#44) Co-authored-by: Christian Banse <[email protected]>
I am basing this off the
v4
branch because getting this to work without Go modules is a pain.Addressed all the issues that static check discovered. Also deprecated several functions that were just used internally.