-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy path.simplecov
More file actions
29 lines (24 loc) · 826 Bytes
/
.simplecov
File metadata and controls
29 lines (24 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true
require "simplecov-console"
SimpleCov.start "rails" do
add_filter [
"demo/",
"previews/",
"test/test_helpers/",
"lib/tasks",
"lib/yard"
]
# Filter demo app files that appear without the demo/ prefix due to Rails.root context
add_filter do |src_file|
# Check if this is a demo app file by looking at the full path
full_path = File.expand_path(src_file.filename)
full_path.include?("/demo/app/")
end
command_name "rails#{ENV['RAILS_VERSION']}-ruby#{ENV['RUBY_VERSION']}" if ENV["RUBY_VERSION"]
formatter SimpleCov::Formatter::Console
SimpleCov::Formatter::Console.max_rows = 50
SimpleCov::Formatter::Console.output_style = "block"
add_group "Ignored Code" do |src_file|
File.readlines(src_file.filename).grep(/:nocov:/).any?
end
end