Skip to content

Commit cdd1f36

Browse files
amos-chen许佳玥
andauthored
fix: windows src_path lowercase by os.path.normcase but file_name is origin format (#553)
Co-authored-by: 许佳玥 <[email protected]>
1 parent 6b712eb commit cdd1f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff_cover/violationsreporters/violations_reporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def get_src_path_line_nodes_clover(xml_document, src_path):
133133

134134
def _measured_source_path_matches(self, package_name, file_name, src_path):
135135
# find src_path in any of the source roots
136-
if not src_path.endswith(file_name):
136+
if not src_path.endswith(util.to_unix_path(file_name)):
137137
return False
138138

139139
norm_src_path = os.path.normcase(src_path)

0 commit comments

Comments
 (0)