letsencrypt / ct-woodpecker

A tool to monitor a certificate transparency log for operational problems
Mozilla Public License 2.0
182 stars 19 forks source link

Add golang-ci linting, tidy up lint findings. #87

Closed cpu closed 5 years ago

cpu commented 5 years ago

This PR adds golangci-lint to ct-woodpecker's Travis CI process with a customized config. There are a couple exclude patterns added for issues that seem to me like false positives or are known things that need to be done but have a tracking issue already.

This PR also updates the repo with the same CODE_OF_CONDUCT.md used in Boulder that points to the community forum's copy of the code of conduct.

I broke API compatibility renaming monitor.MonitorOptions to monitor.Options so this should probably invoke a major version tagged release after being merged.

cpu commented 5 years ago

Though it passes locally I've having some trouble getting golangci-lint to pass in Travis. The errors seem related to dependency resolution. I will dig into this when I get a chance.

cpu commented 5 years ago

As of e6ace5e CI is passing again. I had to add a go mod download before the golangci-lint invocation to fix the dependency resolution errors I was seeing. This seems wrong and slows the build down a little bit. I think the best thing to do is merge as-is and then track solving this as a follow-up.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 637


Changes Missing Coverage Covered Lines Changed/Added Lines %
monitor/cert_submitter.go 5 6 83.33%
<!-- Total: 13 14 92.86% -->
Totals Coverage Status
Change from base Build 617: 0.0%
Covered Lines: 836
Relevant Lines: 1225

💛 - Coveralls