Skip to content

Commit

Permalink
bump: Update case-app to 2.1.0-M26 (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab authored Mar 25, 2024
1 parent 161c45f commit 5e8b907
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name := "codacy-coverage-reporter"

// Runtime dependencies
libraryDependencies ++= Seq(
"com.github.alexarchambault" %% "case-app" % "2.1.0-M14",
"com.github.alexarchambault" %% "case-app" % "2.1.0-M26",
"org.wvlet.airframe" %% "airframe-log" % "22.3.0",
"com.lihaoyi" %% "ujson" % "1.5.0"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.codacy.configuration.parser
import java.io.File
import caseapp._
import caseapp.core.Error
import caseapp.core.app._
import caseapp.core.app
import caseapp.core.argparser.ArgParser
import com.codacy.api.OrganizationProvider
import com.codacy.configuration.parser.ConfigArgumentParsers._
Expand All @@ -12,14 +12,24 @@ import com.codacy.parsers.implementation._
// Intellij keeps removing this import, I'll leave it here for future reference
// import com.codacy.configuration.parser.ConfigArgumentParsers._

abstract class ConfigurationParsingApp extends CommandAppWithPreCommand[BaseCommand, CommandConfiguration] {
override final def run(options: CommandConfiguration, remainingArgs: RemainingArgs): Unit = {
sys.exit(run(options))
abstract class ConfigurationParsingApp extends app.CommandsEntryPoint { self =>

object ReportCommand extends app.Command[Report] {

def run(options: Report, remainingArgs: RemainingArgs): Unit =
sys.exit(self.run(options))
}

def run(config: CommandConfiguration): Int
object FinalCommand extends app.Command[Final] {

override def beforeCommand(options: BaseCommand, remainingArgs: Seq[String]): Unit = ()
def run(options: Final, remainingArgs: RemainingArgs): Unit =
sys.exit(self.run(options))
}

def commands = Seq(ReportCommand, FinalCommand)
def progName: String = "codacy-coverage-reporter"

def run(config: CommandConfiguration): Int
}

@AppName("codacy-coverage-reporter")
Expand Down

0 comments on commit 5e8b907

Please sign in to comment.