linters-common-0.1.0.0: Common library for GHC linting scripts
Safe HaskellSafe-Inferred
LanguageHaskell2010

Linters.Common

Synopsis

Documentation

data LintMsg Source #

Constructors

LintMsg !LintLvl !Int !Text !Text 

Instances

Instances details
Show LintMsg Source # 
Instance details

Defined in Linters.Common

data LintLvl Source #

Constructors

LintLvlWarn 
LintLvlErr 

Instances

Instances details
Show LintLvl Source # 
Instance details

Defined in Linters.Common

Eq LintLvl Source # 
Instance details

Defined in Linters.Common

Methods

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

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

Ord LintLvl Source # 
Instance details

Defined in Linters.Common

type Sh = IO Source #

silently :: a -> a Source #

runGitStdin :: FilePath -> Text -> [Text] -> Text -> Sh Text Source #

Run git operation

withUtf8 :: Sh a -> Sh a Source #

WARNING: non-reentrant Hack!

gitCatCommit :: FilePath -> GitRef -> Sh (Text, Text) Source #

wrapper around git cat-file commit

Returns (commit-header, commit-body)

gitCatBlob :: FilePath -> GitRef -> Sh Text Source #

wrapper around git cat-file commit

gitNormCid :: FilePath -> GitRef -> Sh GitRef Source #

Wrapper around git rev-parse --verify

Normalise git ref to commit sha1

gitBranchesContain :: FilePath -> GitRef -> Sh [Text] Source #

wrapper around git branch --contains

getModules :: FilePath -> GitRef -> Sh [(Text, (Text, Text))] Source #

returns [(path, (url, key))]

may throw exception

gitDiffTree :: FilePath -> GitRef -> Sh (Text, [([(GitType, Text, Char)], (GitType, Text), Text)]) Source #

Possible meanings of the Char value:

  • Added (A),
  • Copied (C),
  • Deleted (D),
  • Modified (M),
  • Renamed (R),
  • have their type (i.e. regular file, symlink, submodule, ...) changed (T),
  • are Unmerged (U),
  • are Unknown (X),
  • or have had their pairing Broken (B).

tshow :: Show a => a -> Text Source #