File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,15 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
6969 Serializer .serialize(coverage, outputPath, ctx.settings.sourceroot.value)
7070
7171 private def isClassIncluded (sym : Symbol )(using Context ): Boolean =
72+ val fqn = sym.fullName.toText(ctx.printerFn(ctx)).show
7273 coverageExcludeClasslikePatterns.isEmpty || ! coverageExcludeClasslikePatterns.exists(
73- _.matcher(sym.fullName.toText(ctx.printerFn(ctx)).show ).nn.matches
74+ _.matcher(fqn ).nn.matches
7475 )
7576
7677 private def isFileIncluded (file : SourceFile )(using Context ): Boolean =
78+ val normalizedPath = file.path.replace(" .scala" , " " )
7779 coverageExcludeFilePatterns.isEmpty || ! coverageExcludeFilePatterns.exists(
78- _.matcher(file.path.replace( " .scala " , " " ) ).nn.matches
80+ _.matcher(normalizedPath ).nn.matches
7981 )
8082
8183 override protected def newTransformer (using Context ) =
You can’t perform that action at this time.
0 commit comments