PrettifyCommand

com.ossuminc.riddl.commands.PrettifyCommand
See thePrettifyCommand companion object

A command to Prettify RIDDL Source

Attributes

Companion
object
Source
PrettifyCommand.scala
Graph
Supertypes
trait Command[Options]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def getOptionsParser: (OParser[Unit, Options], Options)

Provide a scopt OParser for the commands options type, OPT

Provide a scopt OParser for the commands options type, OPT

Attributes

Returns

A pair: the OParser and the default values for OPT

Definition Classes
Source
PrettifyCommand.scala
override def getPasses(options: Options): PassCreators

Get the passes to run given basic input for pass creation

Get the passes to run given basic input for pass creation

Value parameters

commonOptions

The common options for the command

log

The log to use

options

The command options

Attributes

Returns

A com.ossuminc.riddl.passes.PassCreator function that creates the pass

Definition Classes
Source
PrettifyCommand.scala
override def interpretConfig(config: Config): Options

Provide a typesafe/Config reader for the commands options.

Provide a typesafe/Config reader for the commands options. This reader should read an object having the same name as the command. The fields of that object must correspond to the fields of the OPT type.

Attributes

Returns

A pureconfig.ConfigReader[OPT] that knows how to read OPT

Definition Classes
Source
PrettifyCommand.scala
def overrideOptions(options: Options, newOutputDir: Path): Options

A method to override the options

A method to override the options

Attributes

Source
PrettifyCommand.scala
override def run(originalOptions: Options, outputDirOverride: Option[Path]): Either[List[Message], PassesResult]

The basic implementation of the command.

The basic implementation of the command. This should be called with super.run(...) from the subclass implementation.

Value parameters

commonOptions

The options common to all commands

log

A log for logging errors, warnings, and info

originalOptions

The original options to the command

outputDirOverride

Any override to the outputDir option from the command line

Attributes

Returns

Either a set of Messages on error or a Unit on success

Definition Classes
Source
PrettifyCommand.scala

Inherited methods

def inputFile(f: (File, Options) => Options): OParser[File, Options]

Attributes

Inherited from:
Command
Source
Command.scala
def loadOptionsFrom(configFile: Path): Either[Messages, Options]

Attributes

Inherited from:
Command
Source
Command.scala
def outputDir(f: (File, Options) => Options): OParser[File, Options]

Attributes

Inherited from:
Command
Source
Command.scala

Attributes

Inherited from:
Command
Source
Command.scala
protected def replaceInputFile(options: Options, inputFile: Path): Options

Attributes

Inherited from:
Command
Source
Command.scala
def resolveInputFileToConfigFile(options: Options, configFile: Path): Options

Attributes

Inherited from:
Command
Source
Command.scala
def run(args: Array[String], outputDirOverride: Option[Path]): Either[Messages, PassesResult]

Attributes

Inherited from:
Command
Source
Command.scala

Inherited fields

protected val builder: OParserBuilder[Options]

Attributes

Inherited from:
Command
Source
Command.scala

Attributes

Inherited from:
Command
Source
Command.scala