@@ -776,7 +776,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
776
776
end maybeFailureMessage
777
777
778
778
def getWarnMapAndExpectedCount (files : Seq [JFile ]): (HashMap [String , Integer ], Int ) =
779
- val comment = raw " //( *)warn " .r
779
+ val comment = raw " //( *)(nopos-)? warn " .r
780
780
val map = new HashMap [String , Integer ]()
781
781
var count = 0
782
782
def bump (key : String ): Unit =
@@ -787,8 +787,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
787
787
files.filter(isSourceFile).foreach { file =>
788
788
Using (Source .fromFile(file, StandardCharsets .UTF_8 .name)) { source =>
789
789
source.getLines.zipWithIndex.foreach { case (line, lineNbr) =>
790
- comment.findAllMatchIn(line).foreach { _ =>
791
- bump(s " ${file.getPath}: ${lineNbr+ 1 }" )
790
+ comment.findAllMatchIn(line).foreach { m =>
791
+ m.group(2 ) match
792
+ case " nopos-" =>
793
+ bump(" nopos" )
794
+ case _ => bump(s " ${file.getPath}: ${lineNbr+ 1 }" )
792
795
}
793
796
}
794
797
}.get
@@ -809,8 +812,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
809
812
val key = s " ${relativize(srcpos.source.file.toString())}: ${srcpos.line + 1 }"
810
813
if ! seenAt(key) then unexpected += key
811
814
else
812
- unpositioned += relativize(srcpos.source.file.toString())
813
-
815
+ if (! seenAt(" nopos" )) unpositioned += relativize(srcpos.source.file.toString())
814
816
reporterWarnings.foreach(sawDiagnostic)
815
817
816
818
(map.asScala.keys.toList, (unexpected ++ unpositioned).toList)
0 commit comments