带有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?

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

The code in red is not covered by tests.