| Copyright | (c) 2020 Kowainik | 
|---|---|
| License | MPL-2.0 | 
| Maintainer | Kowainik <xrom.xkov@gmail.com> | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Stan.Inspection
Description
Inspection — check or test provided by Stan.
Synopsis
- data Inspection = Inspection {}
 - categoryL :: Lens' Inspection (NonEmpty Category)
 - descriptionL :: Lens' Inspection Text
 - solutionL :: Lens' Inspection [Text]
 - severityL :: Lens' Inspection Severity
 - analysisL :: Lens' Inspection InspectionAnalysis
 - data InspectionAnalysis
 - type InspectionsMap = HashMap (Id Inspection) Inspection
 - sortById :: InspectionsMap -> [Inspection]
 - prettyShowInspection :: Inspection -> Text
 - prettyShowInspectionShort :: Inspection -> Text
 - inspectionsMd :: [Inspection] -> Text
 
Stan inspection type
data Inspection Source #
Data type that represents a check/test, or how we call it inspection that is provided by the Stan tool.
Constructors
| Inspection | |
Fields 
  | |
Instances
| Eq Inspection Source # | |
Defined in Stan.Inspection  | |
| Show Inspection Source # | |
Defined in Stan.Inspection Methods showsPrec :: Int -> Inspection -> ShowS # show :: Inspection -> String # showList :: [Inspection] -> ShowS #  | |
Inspection info
data InspectionAnalysis Source #
Data type that represents all possible types of stan
inspections in a uniformed way.
Constructors
| FindAst !PatternAst | Find the specific part of the Haskell AST (including specific functions).  | 
| Infix | Find all operators without matching   | 
| LazyField | Check if the data type has lazy fields  | 
| BigTuples | Usage of tuples with size >= 4  | 
| PatternMatchOn_ | Pattern matching on   | 
| UseCompare | Replace multiple comparison operations with   | 
Instances
| Eq InspectionAnalysis Source # | |
Defined in Stan.Inspection Methods (==) :: InspectionAnalysis -> InspectionAnalysis -> Bool # (/=) :: InspectionAnalysis -> InspectionAnalysis -> Bool #  | |
| Show InspectionAnalysis Source # | |
Defined in Stan.Inspection Methods showsPrec :: Int -> InspectionAnalysis -> ShowS # show :: InspectionAnalysis -> String # showList :: [InspectionAnalysis] -> ShowS #  | |
type InspectionsMap = HashMap (Id Inspection) Inspection Source #
Type alias for the HashMap that contains pairs of inspections Ids and
corresponding Inspections.
Sorting
sortById :: InspectionsMap -> [Inspection] Source #
Sort Inspection by Id
Pretty print
prettyShowInspection :: Inspection -> Text Source #
Show Inspection in a human-friendly format.
prettyShowInspectionShort :: Inspection -> Text Source #
Show the short view of a given Inspection.
Markdown
inspectionsMd :: [Inspection] -> Text Source #
Create the MarkDown text for all inspections. The generated MD has a ToC and separate sections for each inspection.
This is used to keep the Wiki page of the project up to date.