File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed
src/main/scala/org/polystat Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ version = "3.5.2"
22runner.dialect = scala3
33trailingCommas = multiple
44rewrite.scala3.convertToNewSyntax = yes
5- rewrite.scala3.insertEndMarkerMinLines = 4
5+ # FIXME: this line causes EO.scala to fail
6+ # rewrite.scala3.insertEndMarkerMinLines = 4
67rewrite.scala3.removeOptionalBraces = oldSyntaxToo
78project.git = true
89
Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ object EO:
4444 cfg.output.dirs.traverse_(out =>
4545 val outPath =
4646 out / " sarif" / codePath.replaceExt(" .sarif.json" )
47-
48- IO .println(s " Writing results to $outPath" ) *>
49- writeOutputTo(outPath)(sarifJson)
47+ for
48+ _ <- IO .println(s " Writing results to $outPath" )
49+ _ <- writeOutputTo(outPath)(sarifJson)
50+ yield ()
5051 )
5152 }
5253 yield ()
@@ -68,6 +69,16 @@ object EO:
6869 }
6970 }
7071
71- analyzeToDirs *> analyzeAggregate
72+ for
73+ _ <- cfg.output.dirs.traverse_ { outDir =>
74+ for
75+ _ <- IO .println(s " Cleaning $outDir before writing... " )
76+ _ <- outDir.clean
77+ yield ()
78+ }
79+ _ <- analyzeToDirs
80+ _ <- analyzeAggregate
81+ yield ()
82+ end for
7283 end analyze
7384end EO
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ object InputUtils:
2020 ._1 + newExt
2121 )
2222
23+ def clean : IO [Path ] =
24+ for
25+ _ <- Files [IO ].deleteRecursively(path)
26+ _ <- Files [IO ].createDirectory(path)
27+ yield path
28+
2329 def toInput : IO [Input ] =
2430 Files [IO ]
2531 .isDirectory(path)
Original file line number Diff line number Diff line change @@ -72,10 +72,7 @@ object Main extends IOApp:
7272 filteredAnalyzers = filterAnalyzers(inex),
7373 tempDir = tmp match
7474 case Some (path) =>
75- (IO .println(s " Cleaning ${path.absolute}... " ) *>
76- Files [IO ].deleteRecursively(path) *>
77- Files [IO ].createDirectory(path))
78- .as(path)
75+ IO .println(s " Cleaning ${path.absolute}... " ) *> path.clean
7976 case None => Files [IO ].createTempDirectory
8077 ,
8178 output = out,
You can’t perform that action at this time.
0 commit comments