-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add new linters #486
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 new linters #486
Conversation
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.
Hey @johejo, this is great! I'm really glad you're taking an interest in keeping the code clean, always happy to review PRs like this.
I added a few comments, please review and update, nothing too major 🙂
oauthproxy.go
Outdated
} | ||
var u url.URL | ||
u = *p.redirectURL | ||
var u url.URL = *p.redirectURL |
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.
var u url.URL = *p.redirectURL | |
u := *p.redirectURL |
providers/logingov.go
Outdated
func (p *LoginGovProvider) GetLoginURL(redirectURI, state string) string { | ||
var a url.URL | ||
a = *p.LoginURL | ||
var a url.URL = *p.LoginURL |
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.
var a url.URL = *p.LoginURL | |
a := *p.LoginURL |
providers/provider_default.go
Outdated
func (p *ProviderData) GetLoginURL(redirectURI, state string) string { | ||
var a url.URL | ||
a = *p.LoginURL | ||
var a url.URL = *p.LoginURL |
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.
var a url.URL = *p.LoginURL | |
a := *p.LoginURL |
.golangci.yml
Outdated
- bodyclose | ||
- dogsled | ||
- goprintffuncname | ||
- interfacer |
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 know interfacer is deprecated so please remove this one
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.
Awesome, LGTM!
If you're interested in code clean up, I'd appreciate some review on #484 which is aiming at updating how our options are loaded with some longer term goals of improving the options
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.
Awesome!
Description
Enable some linters and fix issues.
Fixed some deprecated and dangerous code.
I chose linter carefully, but would like to respect the opinions of the maintainers, so please let me know thoughts.
Motivation and Context
We want to make incremental improvements to maintain our code in a sustainable way.
This is the first step.
How Has This Been Tested?
make test
Checklist: