Skip to content

Commit 3d2440f

Browse files
hjrochaFrancisco
authored andcommitted
change skipCommitUuidValidationValue path
1 parent e6c87b9 commit 3d2440f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

cli/src/main/scala/com/codacy/analysis/cli/command/AnalyseCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class AnalyseCommand(analyze: Analyze,
119119
{ repository =>
120120
for {
121121
_ <- validateNoUncommitedChanges(repository, configuration.upload.upload)
122-
_ <- validateGitCommitUuid(repository, analyze.commitUuid, analyze.options.skipCommitUuidValidationValue)
122+
_ <- validateGitCommitUuid(repository, analyze.commitUuid, analyze.skipCommitUuidValidationValue)
123123
} yield ()
124124
})
125125
}

cli/src/main/scala/com/codacy/analysis/cli/command/CLIApp.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,8 @@ final case class DefaultCommand(
101101
}
102102

103103
final case class CommonOptions(@ValueDescription("Run the tool with verbose output")
104-
verbose: Int @@ Counter = Tag.of(0),
105-
@ExtraName("s") @ValueDescription("Skip commit UUID validation")
106-
skipCommitUuidValidation: Int @@ Counter = Tag.of(0)) {
104+
verbose: Int @@ Counter = Tag.of(0)) {
107105
val verboseValue: Boolean = verbose.## > 0
108-
val skipCommitUuidValidationValue: Boolean = skipCommitUuidValidation.## > 0
109106
}
110107

111108
sealed trait CommandOptions {
@@ -144,6 +141,8 @@ final case class Analyze(
144141
output: Option[File] = Option.empty,
145142
@ExtraName("c") @ValueDescription("The commit UUID of the commit that will be analysed")
146143
commitUuid: Option[Commit.Uuid] = Option.empty,
144+
@ExtraName("s") @ValueDescription("Skip commit UUID validation")
145+
skipCommitUuidValidation: Int @@ Counter = Tag.of(0),
147146
@ExtraName("u") @ValueDescription("If the results should be uploaded to the API")
148147
upload: Int @@ Counter = Tag.of(0),
149148
@ExtraName("p") @ValueDescription("The number of tools to run in parallel")
@@ -174,6 +173,8 @@ final case class Analyze(
174173
val allowNetworkValue: Boolean = allowNetwork.## > 0
175174
val forceFilePermissionsValue: Boolean = forceFilePermissions.## > 0
176175
val ghCodeScanningCompatValue: Boolean = ghCodeScanningCompat.## > 0
176+
val skipCommitUuidValidationValue: Boolean = skipCommitUuidValidation.## > 0
177+
177178
}
178179

179180
final case class ValidateConfiguration(@Recurse

0 commit comments

Comments
 (0)