xrefcheck-0.3.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Xrefcheck.Scan

Description

Generalised repo scanner and analyser.

Synopsis

Documentation

type ExclusionConfig = ExclusionConfig' Identity Source #

Type alias for ExclusionConfig' with all required fields.

data ExclusionConfig' f Source #

Config of repositry exclusions.

Constructors

ExclusionConfig 

Fields

Instances

Instances details
FromJSON ExclusionConfig Source # 
Instance details

Defined in Xrefcheck.Scan

FromJSON (ExclusionConfig' Maybe) Source # 
Instance details

Defined in Xrefcheck.Scan

Generic (ExclusionConfig' f) Source # 
Instance details

Defined in Xrefcheck.Scan

Associated Types

type Rep (ExclusionConfig' f) :: Type -> Type #

type Rep (ExclusionConfig' f) Source # 
Instance details

Defined in Xrefcheck.Scan

type Rep (ExclusionConfig' f) = D1 ('MetaData "ExclusionConfig'" "Xrefcheck.Scan" "xrefcheck-0.3.0-GeqFdwqv2mJ31qwgW3PUq5" 'False) (C1 ('MetaCons "ExclusionConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ecIgnore") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Field f [CanonicalRelGlobPattern])) :*: S1 ('MetaSel ('Just "ecIgnoreLocalRefsTo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Field f [CanonicalRelGlobPattern]))) :*: (S1 ('MetaSel ('Just "ecIgnoreRefsFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Field f [CanonicalRelGlobPattern])) :*: S1 ('MetaSel ('Just "ecIgnoreExternalRefsTo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Field f [Regex])))))

type FileSupport = IsSymlink -> Extension -> Maybe ScanAction Source #

All supported ways to parse a file.

data ReadDirectoryMode Source #

Constructors

RdmTracked

Consider files tracked by Git, obtained from "git ls-files"

RdmUntracked

Consider files that are not tracked nor ignored by Git, obtained from "git ls-files --others --exclude-standard"

RdmBothTrackedAndUtracked

Combine output from commands listed above, so we consider all files except ones that are explicitly ignored by Git

type ScanAction = FilePath -> RelPosixLink -> IO (FileInfo, [ScanError 'Parse]) Source #

Way to parse a file.

data ScanError (a :: ScanStage) Source #

A scan error indexed by different process stages.

Within Parse, seFile has no information because the same file is being parsed.

Within Gather, seFile stores the FilePath corresponding to the file in where the error was found.

Constructors

ScanError 

Fields

Instances

Instances details
Show (ScanError 'Gather) Source # 
Instance details

Defined in Xrefcheck.Scan

Show (ScanError 'Parse) Source # 
Instance details

Defined in Xrefcheck.Scan

Eq (ScanError 'Gather) Source # 
Instance details

Defined in Xrefcheck.Scan

Eq (ScanError 'Parse) Source # 
Instance details

Defined in Xrefcheck.Scan

data ScanStage Source #

Constructors

Parse 
Gather 

mkGatherScanError :: RelPosixLink -> ScanError 'Parse -> ScanError 'Gather Source #

Promote a ScanError from the Parse stage to the Gather stage.

Orphan instances