From 5df728758cb6e35ba53ce4b7633dbcf7cf18c892 Mon Sep 17 00:00:00 2001 From: Andreas Steinel Date: Thu, 21 Apr 2022 01:13:34 +0200 Subject: [PATCH] enable coverage report for type shellscript With `bashcov` and the following configuration for `simplecov` can you get coverage reports for you shell scripts. ```ruby # gem install simplecov-lcov simplecov-console require 'simplecov-lcov' require 'simplecov-console' SimpleCov.start do add_filter %r{^/.git} end # Monkeypatch # https://github.com/fortissimo1997/simplecov-lcov/pull/25 if ! SimpleCov.respond_to?(:branch_coverage?) module SimpleCov def self.branch_coverage? false end end end SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true SimpleCov::Formatter::LcovFormatter.config do |c| c.output_directory = 'coverage' # default: "coverage/lcov" c.lcov_file_name = 'lcov.info' end SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::LcovFormatter, SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::Console ]) ``` --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 60a9b9f..1ad3cfc 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "onLanguage:rust", "onLanguage:typescript", "onLanguage:typescriptreact", + "onLanguage:shellscript", "onLanguage:vb" ], "main": "./out/src/extension.js",