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: