We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c95cf5 commit 0626201Copy full SHA for 0626201
lib/slather/coverage_info.rb
@@ -72,8 +72,11 @@ def rate_branches_tested
72
73
def source_file_pathname_relative_to_repo_root
74
test_path=source_file_pathname
75
- if ENV["COVERAGE_PATH_EQUIVALENCE"]
76
- test_path=Pathname("." + "#{source_file_pathname}".delete_prefix(ENV["COVERAGE_PATH_EQUIVALENCE"].delete_suffix(",.")))
+ equivalence=ENV["COVERAGE_PATH_EQUIVALENCE"]
+ if equivalence
77
+ if "#{source_file_pathname}".start_with?(equivalence)
78
+ test_path=Pathname("." + "#{source_file_pathname}".delete_prefix(equivalence.delete_suffix(",.")))
79
+ end
80
end
81
test_path.realpath.relative_path_from(Pathname("./").realpath)
82
0 commit comments