Skip to content

Commit 5a26d9c

Browse files
committed
renamed variables
1 parent 5d6129b commit 5a26d9c

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/main/scala/org/polystat/cli/Main.scala

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,33 +104,32 @@ object Main extends IOApp:
104104
case Input.FromDirectory(dir) => dir.pure[IO]
105105
case Input.FromFile(file) =>
106106
for
107-
singleFileCodeDir <-
107+
singleFileTmpDir <-
108108
(tempDir / "singleFile").unsafeToDirectory.createDirIfDoesntExist
109-
singleFileCodePath =
110-
(singleFileCodeDir / (file.filenameNoExt + ext)).unsafeToFile
111-
singleFileCodeFile <-
112-
singleFileCodePath.unsafeToFile.createFileIfDoesntExist
109+
singleFileTmpPath =
110+
(singleFileTmpDir / (file.filenameNoExt + ext)).unsafeToFile
111+
_ <- singleFileTmpPath.unsafeToFile.createFileIfDoesntExist
113112
_ <- readCodeFromFile(ext, file)
114113
.map(_._2)
115114
.through(fs2.text.utf8.encode)
116-
.through(Files[IO].writeAll(singleFileCodePath))
115+
.through(Files[IO].writeAll(singleFileTmpPath))
117116
.compile
118117
.drain
119-
yield singleFileCodeDir
118+
yield singleFileTmpDir
120119
case Input.FromStdin =>
121120
for
122-
stdinCodeDir <-
121+
stdinTmpDir <-
123122
(tempDir / "stdin").unsafeToDirectory.createDirIfDoesntExist
124-
stdinCodeFilePath =
125-
(stdinCodeDir / ("stdin" + ext)).unsafeToFile
126-
stdinCodeFile <- stdinCodeFilePath.createFileIfDoesntExist
123+
stdinTmpFilePath =
124+
(stdinTmpDir / ("stdin" + ext)).unsafeToFile
125+
_ <- stdinTmpFilePath.createFileIfDoesntExist
127126
_ <-
128127
readCodeFromStdin
129128
.through(fs2.text.utf8.encode)
130-
.through(Files[IO].writeAll(stdinCodeFilePath))
129+
.through(Files[IO].writeAll(stdinTmpFilePath))
131130
.compile
132131
.drain
133-
yield stdinCodeDir
132+
yield stdinTmpDir
134133

135134
processedConfig = ProcessedConfig(
136135
filteredAnalyzers = filterAnalyzers(inex),

0 commit comments

Comments
 (0)