douping5015 2017-04-05 08:31
浏览 48
已采纳

带有Go-Plus的Atom Editor 1.15.0在源代码中具有红色背景

I have updated Atom to latest (1.15.0) and updated all plugin. I have go-plus and go-debug plugins.

I get randomly red background for large number of methods in Go files. If I save file it disappears for few seconds.

enter image description here

I thought it is some warning but I do not see warning in go-plus.

Any ideas.. What does red bg means and how to disable it?

  • 写回答

2条回答 默认 最新

  • douyun6399 2017-04-05 10:29
    关注

    If a package has no test files, Atom will show the default background for all source code lines.

    If a package has at least 1 test file, by default tests are run on every save. While the tests are run, the lines are displayed with default background, and when tests complete, code lines that can be tested but were not covered by tests will appear with red background.

    You can change this in settings:

    View -> Preferences -> Packages -> go-plus settings -> Test section
    
    • Run Tests On Save: with this you can disable running tests on save
    • Run Tests With Coverage: disabling this will still run your tests, but will not run them with coverage mode, and thus will not highlight untested lines
    • Coverage Highlight Mode: with this setting you can choose what to highlight, by default untested code is highlighted in red background, you can opt to highlight tested lines with green background, or highhlight both, or none of them (disabled)
    • Coverage Display Mode: now this comes handy; default option is highlight, which shows the whole lines using different background. Change it to gutter, and now only the line numbers will have different background, but not the code itself, this is much less disturbing

    This was introduced in go-plus v5.0. Here's an animated gif to highlight the differences:

    enter image description here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记