TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Lint – run linters from go test

2 pointsby vendakkaover 8 years ago

1 comment

vendakkaover 8 years ago
Hi,<p>I&#x27;m the author. Please let me know if you have any questions or comments.<p>This library allows you to run a variety of linters as part of go test. It also supports whitelisting false positives. It reduces the need for build scripts, makes CI integration easy and lets projects enforce linter usage without extra scripts. I built it while working on our mobile app (which is written in Go) and have found it useful so far.<p>The below example test will check for gofmt usage, run go tool vet --shadow, golint, errcheck, gosimple and gostaticcheck<p><pre><code> import ( &quot;testing&quot; &quot;github.com&#x2F;surullabs&#x2F;lint&quot; ) func TestLint(t *testing.T) { if err := lint.Default.Check(&quot;.&#x2F;...&quot;); err != nil { t.Fatal(&quot;lint failures: %v&quot;, err) } } </code></pre> Please let me know if you find this useful and if you&#x27;d like any features added&#x2F;removed&#x2F;modified.