Skip to content

Commit

Permalink
fix(command): Drop an obsolete scanner command option
Browse files Browse the repository at this point in the history
As of ef84184 the support for scanning a file or directory has been
dropped. Remove the corresponding CLI option to fix-up ef84184.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Dec 4, 2023
1 parent ff9e1cf commit 374b4a0
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ package org.ossreviewtoolkit.plugins.commands.scanner
import com.github.ajalt.clikt.core.BadParameterValue
import com.github.ajalt.clikt.core.ProgramResult
import com.github.ajalt.clikt.core.terminal
import com.github.ajalt.clikt.parameters.groups.mutuallyExclusiveOptions
import com.github.ajalt.clikt.parameters.groups.required
import com.github.ajalt.clikt.parameters.groups.single
import com.github.ajalt.clikt.parameters.options.RawOption
import com.github.ajalt.clikt.parameters.options.associate
import com.github.ajalt.clikt.parameters.options.convert
Expand All @@ -51,7 +48,6 @@ import org.ossreviewtoolkit.model.config.OrtConfiguration
import org.ossreviewtoolkit.model.utils.DefaultResolutionProvider
import org.ossreviewtoolkit.model.utils.mergeLabels
import org.ossreviewtoolkit.plugins.commands.api.OrtCommand
import org.ossreviewtoolkit.plugins.commands.api.utils.OPTION_GROUP_INPUT
import org.ossreviewtoolkit.plugins.commands.api.utils.SeverityStatsPrinter
import org.ossreviewtoolkit.plugins.commands.api.utils.configurationGroup
import org.ossreviewtoolkit.plugins.commands.api.utils.outputGroup
Expand All @@ -73,22 +69,13 @@ class ScannerCommand : OrtCommand(
name = "scan",
help = "Run external license / copyright scanners."
) {
private val input by mutuallyExclusiveOptions(
option(
"--ort-file", "-i",
help = "An ORT result file with an analyzer result to use. Source code is downloaded automatically if " +
"needed. Must not be used together with '--input-path'."
).convert { it.expandTilde() }
.file(mustExist = true, canBeFile = true, canBeDir = false, mustBeWritable = false, mustBeReadable = true)
.convert { it.absoluteFile.normalize() },
option(
"--input-path", "-p",
help = "An input directory or file to scan. Must not be used together with '--ort-file'."
).convert { it.expandTilde() }
.file(mustExist = true, canBeFile = true, canBeDir = true, mustBeWritable = false, mustBeReadable = true)
.convert { it.absoluteFile.normalize() },
name = OPTION_GROUP_INPUT
).single().required()
private val input by option(
"--ort-file", "-i",
help = "An ORT result file with an analyzer result to use. Source code is downloaded automatically if needed."
).convert { it.expandTilde() }
.file(mustExist = true, canBeFile = true, canBeDir = false, mustBeWritable = false, mustBeReadable = true)
.convert { it.absoluteFile.normalize() }
.required()

private val outputDir by option(
"--output-dir", "-o",
Expand Down

0 comments on commit 374b4a0

Please sign in to comment.