stan-0.2.0.0: Haskell STatic ANalyser

Copyright | (c) 2020 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Safe Haskell | None
Language | Haskell2010

Stan.Cli

Description

CLI commands and options for `stan`.

Synopsis

- data StanCommand
  - = Stan !StanArgs
  - | StanInspection !InspectionArgs
  - | StanTomlToCli !TomlToCliArgs
  - | StanCliToToml !CliToTomlArgs
  - | StanInspectionsToMd
- data StanArgs = StanArgs {
  - stanArgsHiedir :: !FilePath
  - stanArgsCabalFilePath :: ![FilePath]
  - stanArgsOutputSettings :: !OutputSettings
  - stanArgsReport :: !(Maybe ReportArgs)
  - stanArgsUseDefaultConfigFile :: !(TaggedTrial Text Bool)
  - stanArgsConfigFile :: !(Maybe FilePath)
  - stanArgsConfig :: !PartialConfig
  - stanArgsJsonOut :: !Bool
  }
- newtype ReportArgs = ReportArgs {
  - reportArgsBrowse :: Bool
  }
- newtype InspectionArgs = InspectionArgs {
  - inspectionArgsId :: Maybe (Id Inspection)
  }
- newtype TomlToCliArgs = TomlToCliArgs {
  - tomlToCliArgsFilePath :: Maybe FilePath
  }
- data CliToTomlArgs = CliToTomlArgs {
  - cliToTomlArgsFilePath :: !(Maybe FilePath)
  - cliToTomlArgsConfig :: !PartialConfig
  }
- runStanCli :: IO StanCommand
- stanParserPrefs :: ParserPrefs
- stanCliParser :: ParserInfo StanCommand

# Documentation

data StanCommand #

Commands used in Stan CLI.

Constructors

Stan !StanArgs | Just `stan` with its options.
StanInspection !InspectionArgs | `stan inspection`.
StanTomlToCli !TomlToCliArgs |
    stan toml-to-cli
StanCliToToml !CliToTomlArgs |
    stan cli-to-toml
StanInspectionsToMd |
    stan inspections-to-md

data StanArgs #

Options used for the main `stan` command.

Constructors

StanArgs |
Fields stanArgsHiedir :: !FilePath Directory with HIE files stanArgsCabalFilePath :: ![FilePath] Path to `.cabal` files. stanArgsOutputSettings :: !OutputSettings Settings for output terminal report stanArgsReport :: !(Maybe ReportArgs) `HTML` report settings stanArgsUseDefaultConfigFile :: !(TaggedTrial Text Bool) Use default `.stan.toml` file stanArgsConfigFile :: !(Maybe FilePath) Path to a custom configurations file. stanArgsConfig :: !PartialConfig stanArgsJsonOut :: !Bool Output the machine-readable output in JSON format instead.

newtype ReportArgs #

Constructors

ReportArgs |
Fields reportArgsBrowse :: Bool Open HTML report in a browser

newtype InspectionArgs #

Options used for the `stan inspection` command.

Constructors

InspectionArgs |
Fields inspectionArgsId :: Maybe (Id Inspection)

newtype TomlToCliArgs #

Options used for the `stan toml-to-cli` command.

Constructors

TomlToCliArgs |
Fields tomlToCliArgsFilePath :: Maybe FilePath

data CliToTomlArgs #

Options used for the `stan cli-to-toml` command.

Constructors

CliToTomlArgs |
Fields cliToTomlArgsFilePath :: !(Maybe FilePath) cliToTomlArgsConfig :: !PartialConfig

runStanCli :: IO StanCommand #

Run main parser of the `stan` command line tool.

stanParserPrefs :: ParserPrefs #

To turn on some special options.

stanCliParser :: ParserInfo StanCommand #