Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

golint reporting several "should have comment or be unexported" linting issues #92

Closed
atc0005 opened this issue Jul 16, 2020 · 1 comment · Fixed by #93
Closed

golint reporting several "should have comment or be unexported" linting issues #92

atc0005 opened this issue Jul 16, 2020 · 1 comment · Fixed by #93
Assignees
Labels
bug Something isn't working linting
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Jul 16, 2020

While testing the code in a VM today (where golangci-lint wasn't set as the default linter), one of the files I had open was flagged with linting failures. When I checked closer by running this command:

golint -set_exit_status $(go list -mod=vendor ./... | grep -v /vendor/)

this is what I got back:

T:\github\brick\cmd\brick\constants.go:19:7: exported const MB should have comment or be unexported
T:\github\brick\cmd\es\main.go:38:6: exported type AppConfig should have comment or be unexported
T:\github\brick\cmd\ezproxy\main.go:32:6: exported type Results should have comment or be unexported
T:\github\brick\events\validate.go:24:1: exported function ValidatePayload should have comment or be unexported
Found 4 lint suggestions; failing.

EDIT: After fixing these, one additional issue was flagged:

T:\github\brick\config\getters.go:395:1: comment on exported method Config.EmailNotificationRetryDelay should be of the form "EmailNotificationRetryDelay ..."
Found 1 lint suggestions; failing.
@atc0005 atc0005 added bug Something isn't working linting labels Jul 16, 2020
@atc0005 atc0005 added this to the Next Release milestone Jul 16, 2020
@atc0005 atc0005 self-assigned this Jul 16, 2020
@atc0005
Copy link
Owner Author

atc0005 commented Jul 16, 2020

I've opened an issue here since it appears the issue is with golangci-lint itself:

golangci/golangci-lint#1249

See also atc0005/todo#29.

atc0005 added a commit that referenced this issue Jul 16, 2020
- Update Makefile to add separate, explicit golint
  command against all content *except* for vendored
  deps
  - this is until the golangci-lint tool can be fixed
    or whatever configuration setting that I am not
    applying can be tweak

- Fix "exported const XYZ should have comment or be unexported"
  linting issues

refs GH-92
atc0005 added a commit that referenced this issue Jul 16, 2020
- Update Makefile to add separate, explicit golint
  command against all content *except* for vendored
  deps
  - this is until the golangci-lint tool can be fixed
    or whatever configuration setting that I am not
    applying can be tweaked

- Fix "exported const XYZ should have comment or be unexported"
  linting issues

refs GH-92
atc0005 added a commit that referenced this issue Jul 16, 2020
- Update Makefile
  - add separate, explicit golint
    command against all content *except* for vendored deps
  - add installation step for golint
  - this is intended as a hotfix until the golangci-lint
    tool can be fixed or whatever configuration setting
    that I am not applying can be tweaked

- Fix "exported const XYZ should have comment or be unexported"
  linting issues

refs GH-92
atc0005 added a commit that referenced this issue Jul 16, 2020
- Update Makefile
  - add separate, explicit golint
    command against all content *except* for vendored deps
  - add installation step for golint
  - this is intended as a hotfix until the golangci-lint
    tool can be fixed or whatever configuration setting
    that I am not applying can be tweaked

- Fix "exported const XYZ should have comment or be unexported"
  linting issues

refs GH-92
atc0005 added a commit that referenced this issue Jul 22, 2020
- Remove golint call from Makefile
- Remove `--exclude-use-default` CLI flag
- Add explicit config settings to disable default exclusions

This same config change will need to be pushed to all other
repos where I am using this config set.

Note to self: Docker container sooner than later perhaps?

- refs #92
- refs atc0005/todo#29
- refs atc0005/todo#22
atc0005 added a commit that referenced this issue Jul 22, 2020
- Remove golint call from Makefile
- Remove `--exclude-use-default` CLI flag
- Add explicit config settings to disable default exclusions

This same config change will need to be pushed to all other
repos where I am using this config set.

Note to self: Docker container sooner than later perhaps?

- refs #92
- refs atc0005/todo#29
- refs atc0005/todo#22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working linting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant