| Copyright | (c) 2020 Kowainik | 
|---|---|
| License | MPL-2.0 | 
| Maintainer | Kowainik <xrom.xkov@gmail.com> | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Stan.Observation
Contents
Description
Observation — a vulnerability found in the target project by Stan.
Synopsis
- data Observation = Observation {}
 - type Observations = Slist Observation
 - mkObservation :: Id Inspection -> HieFile -> RealSrcSpan -> Observation
 - mkObservationId :: Id Inspection -> ModuleName -> RealSrcSpan -> Id Observation
 - ignoredObservations :: [Id Observation] -> Observations -> ([Id Observation], [Id Observation])
 - prettyShowObservation :: ReportSettings -> Observation -> Text
 - prettyShowIgnoredObservations :: [Id Observation] -> Observations -> Text
 - prettyObservationSource :: Bool -> Observation -> [Text]
 
Documentation
data Observation Source #
Data type to represent discovered by Stan vulnerabilities.
Constructors
| Observation | |
Fields  | |
Instances
| Eq Observation Source # | |
Defined in Stan.Observation  | |
| Show Observation Source # | |
Defined in Stan.Observation Methods showsPrec :: Int -> Observation -> ShowS # show :: Observation -> String # showList :: [Observation] -> ShowS #  | |
type Observations = Slist Observation Source #
Type alias for the sized list of Observations.
Smart constructors
Arguments
| :: Id Inspection | Corresponding   | 
| -> HieFile | |
| -> RealSrcSpan | Position.  | 
| -> Observation | 
Smart constructor for Observations from HieFiles.
mkObservationId :: Id Inspection -> ModuleName -> RealSrcSpan -> Id Observation Source #
Create a stable Observation Id in a such way that:
Iddoesn't depend on other inspections in this file.Iduniquely identifiesObservationlocation.Ids are guaranteed to be the same if the module content didn't change between differentstanruns.
The Observation Id should look like this:
OBS-STAN-XXXX-module-name-hash-10:42
Arguments
| :: [Id Observation] | |
| -> Observations | |
| -> ([Id Observation], [Id Observation]) | Ignored ^ Unknown  | 
Pretty print
prettyShowObservation :: ReportSettings -> Observation -> Text Source #
Show Observation in a human-friendly format.
prettyShowIgnoredObservations :: [Id Observation] -> Observations -> Text Source #
prettyObservationSource Source #
Arguments
| :: Bool | Use colouring  | 
| -> Observation | |
| -> [Text] |