headroom-0.1.0.0: License Header Manager
Copyright(c) 2019-2020 Vaclav Svejcar
LicenseBSD-3
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.Types

Description

Data types and type class instances shared between modules.

Synopsis

Documentation

data AppConfigError Source #

Error occured during validation of application configuration.

Constructors

EmptySourcePaths

no paths to source code files provided

EmptyTemplatePaths

no paths to license header templates provided

Instances

Instances details
Show AppConfigError Source # 
Instance details

Defined in Headroom.Types

data HeadroomError Source #

Represents fatal application error, that should be displayed to user in some human readable form.

Constructors

InvalidAppConfig [AppConfigError]

invalid application configuration

InvalidLicense Text

unknown license is selected in Generator

InvalidVariable Text

invalid variable format (key=value)

NoGenModeSelected

no mode for Generator command is selected

MissingVariables Text [Text]

not all variables were filled in template

ParseError Text

error parsing template file

data NewLine Source #

Represents newline separator.

Constructors

CR

line ends with r

CRLF

line ends with rn

LF

line ends with n

Instances

Instances details
Eq NewLine Source # 
Instance details

Defined in Headroom.Types

Methods

(==) :: NewLine -> NewLine -> Bool #

(/=) :: NewLine -> NewLine -> Bool #

Show NewLine Source # 
Instance details

Defined in Headroom.Types

data Progress Source #

Progress indication. First argument is current progress, second the maximum value.

Constructors

Progress Int Int 

Instances

Instances details
Eq Progress Source # 
Instance details

Defined in Headroom.Types

Show Progress Source # 
Instance details

Defined in Headroom.Types

data RunMode Source #

Mode of the Run command, states how to license headers in source code files.

Constructors

Add

add license header if missing in source code file

Drop

drop any license header if present in source code file

Replace

replace existing or add license header

Instances

Instances details
Eq RunMode Source # 
Instance details

Defined in Headroom.Types

Methods

(==) :: RunMode -> RunMode -> Bool #

(/=) :: RunMode -> RunMode -> Bool #

Show RunMode Source # 
Instance details

Defined in Headroom.Types

FromJSON RunMode Source # 
Instance details

Defined in Headroom.Types

Methods

parseJSON :: Value -> Parser RunMode

parseJSONList :: Value -> Parser [RunMode]