Request: Test gometalinter vendored linter support

polaris · · 1361 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello,</p> <p><a href="https://github.com/alecthomas/gometalinter/tree/vendored-linters">gometalinter</a> is a tool that concurrently runs a whole bunch of Go linters and normalises their output to a standard format.</p> <p>If you use gometalinter (or would like to), please help by reading on!</p> <p>I just vendored all the linters supported by gometalinter. Ongoing this will make for a much more stable distribution of gometalinter. To support this, gometalinter attempts to find itself in the GOPATH, so it&#39;s a little bit hairy.</p> <p>Before I merge this to master, I&#39;d like to get some more &#34;real world&#34; testing. If you use gometalinter and would like to test the vendoring, do something like the following:</p> <pre><code>cd $GOPATH/src rm -rf github.com/alecthomas/gometalinter mkdir -p github.com/alecthomas cd github.com/alecthomas git clone https://github.com/alecthomas/gometalinter.git cd gometalinter git checkout vendored-linters go install . gometalinter --debug --install </code></pre> <p>Once installed, if you could run gometalinter on your code with <code>--debug</code>, and check that it is finding and executing the vendored linters correctly, and report back here, it would be really helpful.</p> <p>Thanks in advance, Alec</p> <p>Edit: Missed branch switch!</p> <hr/>**评论:**<br/><br/>HectorJ: <pre><p>It installs without problem for me.</p> <p>Runs without crashing and it does find the vendored linters.</p> <p>The only issue I have (but I don&#39;t know if it is related to this branch, I don&#39;t use gometalinter in my projects yet, though it is on my roadmap), is that some linters are VERY greedy.</p> <p>I run it using</p> <pre><code>gometalinter --vendor --debug --deadline=5m ./somePackage/ </code></pre> <p>And I get these warnings:</p> <pre><code>WARNING: deadline exceeded by linter interfacer on somePackage (try increasing --deadline) WARNING: deadline exceeded by linter unconvert on somePackage (try increasing --deadline) WARNING: deadline exceeded by linter aligncheck on somePackage (try increasing --deadline) WARNING: deadline exceeded by linter varcheck on somePackage (try increasing --deadline) WARNING: deadline exceeded by linter errcheck on somePackage (try increasing --deadline) WARNING: deadline exceeded by linter structcheck on somePackage (try increasing --deadline) </code></pre> <p>after 5 minutes of my laptop completely freezing.</p> <p>I&#39;ll try some comparison with the master branch a bit later and will report here.</p> <p>Edit: go version go1.6 linux/amd64</p></pre>alecthomas: <pre><p>Awesome, thanks for testing it out!</p> <p>And yeah, some linters are horrendously slow. The <code>--fast</code> flag disables all the slow linters.</p></pre>tex0: <pre><p>Ran it with &#34;--fast&#34; on all our internal code and it looked OK, only got some warnings:</p> <pre><code>WARNING: failed to kill vetshadow: os: process already finished WARNING: failed to kill gocyclo: os: process already finished WARNING: failed to kill goconst: os: process already finished </code></pre></pre>metamatic: <pre><p>It finds the linters, but I get some spurious errors from the gotype linter, which seems to be constructing the path to the vendor directory incorrectly. I assume that&#39;s not your fault though.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1361 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传