google / triage-party

🎉 Triage Party: massively multi-player GitHub triage 🎉
Apache License 2.0
505 stars 80 forks source link

Golangci linting cleanup #150

Closed kensipe closed 4 years ago

kensipe commented 4 years ago

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:

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