File tree 1 file changed +10
-0
lines changed
compiler/test/dotty/tools 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,18 @@ object StdLibSources {
11
11
12
12
def blacklistFile : String = " compiler/test/dotc/scala-collections.blacklist"
13
13
14
+ def whitelisted : List [String ] = all.diff(blacklisted)
14
15
def blacklisted : List [String ] = loadList(blacklistFile)
15
16
17
+ def all : List [String ] = {
18
+ def collectAllFilesInDir (dir : File , acc : List [String ]): List [String ] = {
19
+ val files = dir.listFiles()
20
+ val acc2 = files.foldLeft(acc)((acc1, file) => if (file.isFile && file.getPath.endsWith(" .scala" )) file.getPath :: acc1 else acc1)
21
+ files.foldLeft(acc2)((acc3, file) => if (file.isDirectory) collectAllFilesInDir(file, acc3) else acc3)
22
+ }
23
+ collectAllFilesInDir(new File (stdLibPath), Nil )
24
+ }
25
+
16
26
private def loadList (path : String ): List [String ] = Source .fromFile(path, " UTF8" ).getLines()
17
27
.map(_.trim) // allow identation
18
28
.filter(! _.startsWith(" #" )) // allow comment lines prefixed by #
You can’t perform that action at this time.
0 commit comments