- 
                Notifications
    You must be signed in to change notification settings 
- Fork 83
chore: clean and unify nolint directives #217
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
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.
interesting nolint by itself on it's own line should be a no op, right?
should probably just delete them
| 
 It's not. It's like nolint:all (AFAIU). | 
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
| just needs a dco then.. | 
| 
 Why I always forget the signoff 😢 Fixed | 
        
          
                pkg/adaptation/api.go
              
                Outdated
          
        
      | // Aliased request/response/event types for api/api.proto. | ||
| // nolint | ||
| // | ||
| //nolint:all | 
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 actgually mention the linters which complain here? Like
| //nolint:all | |
| //nolint:linter1,linter2 // [explanation why we don't lint] | 
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.
@marquiz @saschagrunert Should we than have here //nolint:revive // [ignore warnings about generated types, names, etc.] here ?
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.
@saschagrunert agree, I'm all in for this, i.e. only list the linters that actually raise some errors. The original spirit of the PR was only to change the style, not modify any behavior. If we start to do that I'd suggest to remove the unnecessary nolint directives (most of the ones touched here). Thoughts @saschagrunert @klihub ?
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.
Removing them if they're not required sounds fine to me.
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.
@saschagrunert agree, I'm all in for this, i.e. only list the linters that actually raise some errors. The original spirit of the PR was only to change the style, not modify any behavior. If we start to do that I'd suggest to remove the unnecessary nolint directives (most of the ones touched here). Thoughts @saschagrunert @klihub ?
@marquiz True, I did not realize that only the one for the {Event,ContainerState}_-block is needed in pkg/adaptation/api.go. And it can be a selective one for revive.
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.
Thanks for the feedback. I'll adjust the PR accordingly
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.
Done
Drop unnecessary nolint directives and unify the style of remaining ones to match the rest of the codebase (and the golangci-lint documentation). Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
| Updated, adjusted commit message accordingly. Only one nolint directive left. | 
Drop unnecessary nolint directives and unify the style of remaining ones to match the rest of the codebase (and the golangci-lint documentation).