-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
re-enable golangci-lint's godoc comment checking #501
Comments
#477 has the fix in the first commit |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
book: added generating CRD documentation
/priority backlog |
@DirectXMan12 @vincepri I think this is resolved. #773 updated linters... included with that is #773 just merged! |
I don't think golint is enough to have godoc comments. It appears that golangci-lint has default exclusions. To re-enable godoc errors we'll need to add: issues:
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
# golint: False positive when tests are defined in package 'test'
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
# govet: Common false positives
- (possible misuse of unsafe.Pointer|should have signature)
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
- ineffective break statement. Did you mean to break out of the outer loop
# gosec: Too many false-positives on 'unsafe' usage
- Use of unsafe calls should be audited
# gosec: Too many false-positives for parametrized shell calls
- Subprocess launch(ed with variable|ing should be audited)
# gosec: Duplicated errcheck checks
- G104
# gosec: Too many issues in popular repos
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
# gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- Potential file inclusion via variable to |
perhaps I misunderstood based on my reading of golangci/golangci-lint#456 I'll look into it |
My experience is that you have to do what @vincepri mentioned as well. Should be easy to check though :-) |
/assign @camilamacedo86 |
golangci-lint disables the godoc comment checking because the author considers it annoying. We should make sure it's on, because we've got a couple of issues with our godocs.
The text was updated successfully, but these errors were encountered: