在JetBrains IDE中查看多个文件监视器的输出。

huangapple go评论61阅读模式
英文:

How to see output from multiple File Watchers in JetBrains IDE

问题

I'm using JetBrains GoLand IDE however I assume the answer would be common for any JetBrains IDE such as IntelliJ etc.

我使用的是JetBrains GoLand IDE,但我认为答案对于任何JetBrains IDE,如IntelliJ等都是通用的。

I've configured file watchers for:

我已经为以下文件设置了观察器:

go fmt, golint and go test

go fmt does not have output so it works fine.

go fmt没有输出,所以它工作得很好。

golint and go test both have output. If I enable just one of them I see that output. If I enable both I see the output of golint for only a split second then it is replaced by the output of go test So I will never actually be able to read the output of golint

golintgo test都有输出。如果我只启用其中一个,我会看到该输出。如果我启用两者,我只会看到golint的输出一瞬间,然后被go test的输出替代,所以我实际上永远无法阅读golint的输出。

For now I solved this by making go test only display output on error, if it errors I figure I do not yet care about the output of golint but thought I'd ask anyway.

目前,我通过使go test仅在出现错误时显示输出来解决了这个问题,如果它出现错误,我认为我还不关心golint的输出,但还是想问一下。

英文:

I'm using JetBrains GoLand IDE however I assume the answer would be common for any JetBrains IDE such as IntelliJ etc.

I've configured file watchers for:

go fmt, golint and go test

go fmt does not have output so it works fine.

golint and go test both have output. If I enable just one of them I see that output. If I enable both I see the output of golint for only a split second then it is replaced by the output of go test So I will never actually be able to read the output of golint

For now I solved this by making go test only display output on error, if it errors I figure I do not yet care about the output of golint but thought I'd ask anyway.

答案1

得分: 1

Sure, here's the translated content:

不需要将 go test 作为文件监视器启用,因为默认的测试运行程序可以在文件更改时执行。

要启用此功能,您可以启用 自动重新运行测试切换 功能,该功能位于运行测试窗口左侧从上到下的第三个按钮。您还可以通过齿轮图标配置测试运行的时间间隔。

以下是在 IntelliJ IDEA 中执行此操作的参考,与 GoLand 中的操作相同:https://twitter.com/intellijidea/status/807239309992591361?lang=en

英文:

You don't need to enable go test as a File Watcher as the default test runner can execute on file changes.

To enable this feature, you can enable the Toggle test auto-rerun feature, which is the third button from top to bottom on the left side of the run test window. You can also configure the interval after which the tests run via the cog wheel.

Here's a reference for how to do this in IntelliJ IDEA, which is the same as in GoLand https://twitter.com/intellijidea/status/807239309992591361?lang=en

答案2

得分: 1

已知问题,请投票支持WEB-14387以获取有关其进展的通知。

英文:

Known issue, please vote for WEB-14387 to be notified on any progress with it

huangapple
  • 本文由 发表于 2020年1月6日 22:51:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/59614160.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定