Skip to content
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

Golangci linting cleanup #150

Merged
merged 1 commit into from
Jun 19, 2020
Merged

Golangci linting cleanup #150

merged 1 commit into from
Jun 19, 2020

Conversation

kensipe
Copy link
Contributor

@kensipe kensipe commented Jun 18, 2020

A number of cleanups. Resisted several which were too opinionated and thought might be contentious. This resulted in a bug fix around len(review)
Fixes:

  • remove unnecessary casts
  • switch to non f formatting func for non formatting strings
  • added error handling for non-contentious instances

Things to think about:

  1. There are casts out of mysql and postgress wich are not checked
  2. The template.JS(s) is not escaped and likely should change to JSEscapeString or place a // no lint comment that it has been evaluated to be ok
  3. The time.Time return from cachedIssueComments and cachedReviews is never used
  4. cyclomatic complexity is high for hubbub/item.go:33 and hubbub/match.go:15. These should be refactor IHMO

Signed-off-by: Ken Sipe kensipe@gmail.com

Signed-off-by: Ken Sipe <kensipe@gmail.com>
Copy link
Collaborator

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tstromberg tstromberg merged commit e19d49f into google:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants