Visualise SimpleCov Ruby test coverage in Sublime Text 3.
- Total 460
- Win 63
- Mac 296
- Linux 101
|May 6||May 5||May 4||May 3||May 2||May 1||Apr 30||Apr 29||Apr 28||Apr 27||Apr 26||Apr 25||Apr 24||Apr 23||Apr 22||Apr 21||Apr 20||Apr 19||Apr 18||Apr 17||Apr 16||Apr 15||Apr 14||Apr 13||Apr 12||Apr 11||Apr 10||Apr 9||Apr 8||Apr 7||Apr 6||Apr 5||Apr 4||Apr 3||Apr 2||Apr 1||Mar 31||Mar 30||Mar 29||Mar 28||Mar 27||Mar 26||Mar 25||Mar 24||Mar 23|
SimpleCov for Sublime Text 3
A plugin for Sublime Text 3 for visualising SimpleCov code coverage data in your editor.
- Toggle highlighting of covered (green) and uncovered (red) lines of code.
- Shade of green indicates coverage level (with configurable thresholds).
- Highlight colors configurable.
- View whole file and current line coverage statistics in the status bar.
- Can be disabled in user settings.
- View list of all covered files in project, from least to most coverage.
- Includes color-coded coverage graph (colors configurable).
- Supports wide and compact layouts depending on window width.
First, you must have SimpleCov installed and configured for your project.
Next, install and set up the simplecov-json formatter. If you’re using SimpleCov 0.9 or later, you have the option of using multiple formatters, so you can continue to generate the default HTML report along with the JSON report required by this package.
Finally, install this package using Package Control:
- With Package Control installed, go to Tools > Command Palette.
- Select the Package Control: Install Package command and hit Enter.
- Type SimpleCov and hit Enter.
Run your tests to generate a coverage/coverage.json file in your project. Then:
- Move your cursor around in one of the project’s Ruby files to see file and line coverage info in the status bar.
- Open Command Palette and choose SimpleCov: Toggle Coverage Highlight to display file coverage as green and red colored highlights. By default, lines covered once are highlighted in dark green, lines covered twice are highlighted in brighter green, and lines covered 50 or more times are displayed in very bright green. Invoke the command again to turn highlights off.
- Note: Currently, to update the highlights after a test run, you’ll need to toggle highlighting off and then on again. This will be improved in a future update.
- Open Command Palette and choose SimpleCov: Show Project Coverage to open a panel containing a list of covered Ruby files in your project, from least to most coverage, with a color-coded bar graph indicating the coverage for each file.
Common “non-code” Ruby files, such as spec files, are ignored automatically. Add a .covignore file to your project root in order to add additional, custom ignores.