-
Notifications
You must be signed in to change notification settings - Fork 892
chore: enable exhaustruct linter #8403
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
Conversation
@@ -527,6 +527,7 @@ distro() { | |||
|
|||
if [ -f /etc/os-release ]; then | |||
( | |||
# shellcheck disable=SC1091 |
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.
review: this was making lint fail locally on darwin
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.
Looks great, I think this will can be a really valuable tool which forces us to recognize edge-cases and expanded API surface in relevant places!
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.
👍
One thing that we can do if some structs are just annoying, it maybe adopt a New()
style init and use chaining to fill fields. If there are big structs that annoying to populate each time.
@@ -390,6 +390,7 @@ func New(options *Options) *API { | |||
RedirectToLogin: false, | |||
DisableSessionExpiryRefresh: options.DeploymentValues.DisableSessionExpiryRefresh.Value(), | |||
Optional: false, | |||
SessionTokenFunc: nil, // Default behavior |
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.
Do we need to have the // Default behavior
comment?
The comment on the field says: If nil, the default behavior is used.
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.
We don't need the comment, I was just being super explicit about what it means.
Just enabling on
httpmw\.\w+
for now. We can add coverage as we go.