-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell STatic ANalyser -- -- Stan is a Haskell STatic ANalysis CLI tool. See -- README.md for more details. @package stan @version 0.0.0.0 -- | Category — a type of Inspection. module Stan.Category -- | A type of the inspection. newtype Category Category :: Text -> Category [unCategory] :: Category -> Text -- | Show Category in a human-friendly format. prettyShowCategory :: Category -> Text -- | The list of all available Stan Categorys. stanCategories :: [Category] -- | AntiPattern category of Stan inspections. antiPattern :: Category -- | Infinite category of Stan inspections. infinite :: Category -- | List category of Stan inspections. list :: Category -- | Partial category of Stan inspections. partial :: Category -- | SpaceLeak category of Stan inspections. spaceLeak :: Category -- | Syntax category of Stan inspections. Usually used in -- Style inspections. syntax :: Category -- | Unsafe category of Stan inspections. unsafe :: Category instance Data.Hashable.Class.Hashable Stan.Category.Category instance GHC.Classes.Eq Stan.Category.Category instance GHC.Show.Show Stan.Category.Category -- | Safe Id representation. module Stan.Core.Id -- | A wrapper around the textual value to safely represent IDs for -- different structures by using a phantom parameter. newtype Id a Id :: Text -> Id a [unId] :: Id a -> Text -- | A type alias for the situations when we don't care about the parameter -- of Id but don't want to deal with type variables. type AnyId = Id () -- | Unsafe cast of Id. Implementation uses smart trick to enforce -- usage always with TypeApplications. castId :: forall to from to'. (to == to') ~ 'True => Id from -> Id to' instance Data.Hashable.Class.Hashable (Stan.Core.Id.Id a) instance GHC.Classes.Ord (Stan.Core.Id.Id a) instance GHC.Classes.Eq (Stan.Core.Id.Id a) instance GHC.Show.Show (Stan.Core.Id.Id a) -- | Extra functions to work with lists. module Stan.Core.List -- | Checks that two lists have the same length and that a given binary -- predicate returns True on each corresponding pair of elements. -- --
-- >>> checkWith (==) [] [] -- True -- -- >>> checkWith (==) [1, 2] [1, 2] -- True -- -- >>> checkWith (==) [1, 2] [2, 1] -- False -- -- >>> checkWith (==) [1, 2] [1] -- False --checkWith :: (a -> b -> Bool) -> [a] -> [b] -> Bool -- | Returns list all element pairs without the following properties: -- --
-- >>> foo [1..3] -- [(1, 2), (1, 3), (2, 3)] --nonRepeatingPairs :: [a] -> [(a, a)] -- | Environment variables for stan. module Stan.EnvVars newtype EnvVars EnvVars :: TaggedTrial Text Bool -> EnvVars [envVarsUseDefaultConfigFile] :: EnvVars -> TaggedTrial Text Bool getEnvVars :: IO EnvVars envVarsToText :: EnvVars -> Text -- | Module that contains code that should trigger various beautiful Stan -- inspections :) module Stan.Example -- | Compatibility module for GHC types and functions. Reexports all -- required API to work with the GHC API. module Stan.Ghc.Compat -- | A Module is a pair of a UnitId and a ModuleName. -- -- Module variables (i.e. H) which can be instantiated to -- a specific module at some later point in time are represented with -- moduleUnitId set to holeUnitId (this allows us to avoid -- having to make moduleUnitId a partial operation.) data Module -- | A ModuleName is essentially a simple string, e.g. Data.List. data ModuleName moduleNameString :: ModuleName -> String moduleName :: Module -> ModuleName -- | Get a string representation of a Module that's unique and -- stable across recompilations. eg. -- "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal" moduleStableString :: Module -> String moduleUnitId :: Module -> UnitId -- | A unique, unambiguous name for something, containing information about -- where that thing originated. data Name isExternalName :: Name -> Bool -- | Test if the OccName is that for any operator (whether it is a -- data constructor or variable or whatever) isSymOcc :: OccName -> Bool nameModule :: HasDebugCallStack => Name -> Module nameOccName :: Name -> OccName -- | Get a string representation of a Name that's unique and stable -- across recompilations. Used for deterministic generation of binds for -- derived instances. eg. -- "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String" nameStableString :: Name -> String occNameString :: OccName -> String -- | A RealSrcSpan delimits a portion of a text file. It could be -- represented by a pair of (line,column) coordinates, but in fact we -- optimise slightly by using more compact representations for -- single-line and zero-length spans, both of which are quite common. -- -- The end position is defined to be the column after the end of -- the span. That is, a span of (1,1)-(1,2) is one character long, and a -- span of (1,1)-(1,1) is zero characters long. -- -- Real Source Span data RealSrcSpan srcSpanEndCol :: RealSrcSpan -> Int srcSpanStartCol :: RealSrcSpan -> Int srcSpanStartLine :: RealSrcSpan -> Int srcSpanEndLine :: RealSrcSpan -> Int srcSpanFile :: RealSrcSpan -> FastString -- | Argument Flag -- -- Is something required to appear in source Haskell (Required), -- permitted by request (Specified) (visible type application), or -- prohibited entirely from appearing in source Haskell -- (Inferred)? See Note [VarBndrs, TyCoVarBinders, TyConBinders, -- and visibility] in TyCoRep data ArgFlag Inferred :: ArgFlag Specified :: ArgFlag Required :: ArgFlag -- | Records what things are "available", i.e. in scope data AvailInfo -- | An ordinary identifier in scope Avail :: Name -> AvailInfo -- | A type or class in scope -- -- The AvailTC Invariant: If the type or class is itself to be in -- scope, it must be first in this list. Thus, typically: -- --
-- AvailTC Eq [Eq, ==, \/=] [] --AvailTC :: Name -> [Name] -> [FieldLabel] -> AvailInfo -- | A FastString is an array of bytes, hashed to support fast O(1) -- comparison. It is also associated with a character encoding, so that -- we know how to convert a FastString to the local encoding, or -- to the Z-encoding used by the compiler internally. -- -- FastStrings support a memoized conversion to the Z-encoding via -- zEncodeFS. data FastString -- | Fields in an algebraic record type data FieldLbl a FieldLabel :: FieldLabelString -> Bool -> a -> FieldLbl a -- | User-visible label of the field [flLabel] :: FieldLbl a -> FieldLabelString -- | Was DuplicateRecordFields on in the defining module for this datatype? [flIsOverloaded] :: FieldLbl a -> Bool -- | Record selector function [flSelector] :: FieldLbl a -> a data IfaceTyCon IfaceTyCon :: IfExtName -> IfaceTyConInfo -> IfaceTyCon [ifaceTyConName] :: IfaceTyCon -> IfExtName [ifaceTyConInfo] :: IfaceTyCon -> IfaceTyConInfo data IfaceTyConInfo IfaceTyConInfo :: PromotionFlag -> IfaceTyConSort -> IfaceTyConInfo [ifaceTyConIsPromoted] :: IfaceTyConInfo -> PromotionFlag [ifaceTyConSort] :: IfaceTyConInfo -> IfaceTyConSort -- | The various types of TyCons which have special, built-in syntax. data IfaceTyConSort -- | a regular tycon IfaceNormalTyCon :: IfaceTyConSort -- | e.g. (a, b, c) or (). The arity is the tuple width, -- not the tycon arity (which is twice the width in the case of unboxed -- tuples). IfaceTupleTyCon :: !Arity -> !TupleSort -> IfaceTyConSort -- | e.g. (a | b | c) IfaceSumTyCon :: !Arity -> IfaceTyConSort -- | A heterogeneous equality TyCon (i.e. eqPrimTyCon, eqReprPrimTyCon, -- heqTyCon) that is actually being applied to two types of the same -- kind. This affects pretty-printing only: see Note [Equality predicates -- in IfaceType] IfaceEqualityTyCon :: IfaceTyConSort data IfaceTyLit IfaceNumTyLit :: Integer -> IfaceTyLit IfaceStrTyLit :: FastString -> IfaceTyLit -- | Is a TyCon a promoted data constructor or just a normal type -- constructor? data PromotionFlag NotPromoted :: PromotionFlag IsPromoted :: PromotionFlag data TupleSort BoxedTuple :: TupleSort UnboxedTuple :: TupleSort ConstraintTuple :: TupleSort -- | Wrapper around Haskell module names and conversion functions for GHC -- types. module Stan.Core.ModuleName -- | Wrapper around Haskell module name. newtype ModuleName ModuleName :: Text -> ModuleName [unModuleName] :: ModuleName -> Text -- | Extract ModuleName from Module. fromGhcModule :: Module -> ModuleName -- | Convert ModuleName to ModuleName. fromGhcModuleName :: ModuleName -> ModuleName instance Data.String.IsString Stan.Core.ModuleName.ModuleName instance Data.Hashable.Class.Hashable Stan.Core.ModuleName.ModuleName instance GHC.Classes.Eq Stan.Core.ModuleName.ModuleName instance GHC.Show.Show Stan.Core.ModuleName.ModuleName -- | Compatibility module for HIE types from GHC API. Reexports all -- required API to work with HIE types. module Stan.Hie.Compat -- | Different contexts under which identifiers exist data ContextInfo -- | regular variable Use :: ContextInfo MatchBind :: ContextInfo -- | import/export IEThing :: IEType -> ContextInfo TyDecl :: ContextInfo -- | Value binding ValBind :: BindType -> Scope -> Maybe Span -> ContextInfo -- | Pattern binding -- -- This case is tricky because the bound identifier can be used in two -- distinct scopes. Consider the following example (with -- -XViewPatterns) -- --
-- do (b, a, (a -> True)) <- bar -- foo a ---- -- The identifier a has two scopes: in the view pattern (a -- -> True) and in the rest of the do-block in foo -- a. PatternBind :: Scope -> Scope -> Maybe Span -> ContextInfo ClassTyDecl :: Maybe Span -> ContextInfo -- | Declaration Decl :: DeclType -> Maybe Span -> ContextInfo -- | Type variable TyVarBind :: Scope -> TyVarScope -> ContextInfo -- | Record field RecField :: RecFieldContext -> Maybe Span -> ContextInfo -- | A list of type arguments along with their respective visibilities (ie. -- is this an argument that would return True for -- isVisibleArgFlag?). newtype HieArgs a HieArgs :: [(Bool, a)] -> HieArgs a data HieAST a Node :: NodeInfo a -> Span -> [HieAST a] -> HieAST a [nodeInfo] :: HieAST a -> NodeInfo a [nodeSpan] :: HieAST a -> Span [nodeChildren] :: HieAST a -> [HieAST a] -- | Mapping from filepaths (represented using FastString) to the -- corresponding AST newtype HieASTs a HieASTs :: Map FastString (HieAST a) -> HieASTs a [getAsts] :: HieASTs a -> Map FastString (HieAST a) -- | GHC builds up a wealth of information about Haskell source as it -- compiles it. .hie files are a way of persisting some of this -- information to disk so that external tools that need to work with -- haskell source don't need to parse, typecheck, and rename all over -- again. These files contain: -- --
(?) ≡ True
neg (?) ≡ False
(?) ||| x ≡ x ||| (?) ≡ -- True
(?) &&& x ≡ x -- &&& (?) ≡ x
-- infixr 7 ***, +++, ??? --fixity :: PatternAst -- | Pattern for the function definition: -- --
-- foo x y = ... --fun :: PatternAst -- | Pattern for a single guard branch: -- --
-- | x < y = ... --guardBranch :: PatternAst -- | Lazy data type field. Comes in two shapes: -- --
-- foo = baz --rhs :: PatternAst -- | Pattern for tuples: -- --
-- foo :: Some -> Type --typeSig :: PatternAst -- | case' is a pattern for case EXP of expression (not -- considering branches). case' :: PatternAst -- | lambdaCase is a pattern for case expression (not -- considering branches). lambdaCase :: PatternAst -- | Pattern to represent one pattern matching branch. patternMatchBranch :: PatternAst -- | Pattern to represent right side of the pattern matching, e.g. -- -> "foo". patternMatchArrow :: PatternAst -> PatternAst -- | Pattern to represent one pattern matching branch on _. patternMatch_ :: PatternAst -> PatternAst -- | Pattern for literals in pattern matching. -- -- Note: presents on GHC >=8.10 only. literalPat :: PatternAst -- | Pattern for _ in pattern matching. -- -- Note: presents on GHC >=8.10 only. wildPat :: PatternAst -- | Annotations for constants: 0, "foo", etc. literalAnns :: (FastString, FastString) instance GHC.Classes.Eq Stan.Pattern.Ast.PatternAst instance GHC.Show.Show Stan.Pattern.Ast.PatternAst instance GHC.Classes.Eq Stan.Pattern.Ast.Literal instance GHC.Show.Show Stan.Pattern.Ast.Literal instance Stan.Pattern.Edsl.PatternBool Stan.Pattern.Ast.PatternAst -- | Functions to work with hie specific parts. module Stan.Hie -- | Returns contents of all .hie files recursively in the given -- hie directory. readHieFiles :: FilePath -> IO [HieFile] -- | Get the number of lines of code in the file by analising -- HieFile. countLinesOfCode :: HieFile -> Int -- | Compare two AST nodes on equality. This is a more relaxed version of -- the Eq instance for HieAST because it doesn't compare -- source locations. This function is useful if you want to check whether -- two AST nodes represent the same AST. -- -- This function needs to take the original HieFile because -- constants are not stored in HieAST and to compare constants we -- need to compare parts of source code. eqAst :: forall a. Eq a => HieFile -> HieAST a -> HieAST a -> Bool -- | Take sub-bytestring according to a given span. -- -- TODO: currently works only with single-line spans slice :: RealSrcSpan -> ByteString -> ByteString -- | Some Inspections require to know about types and some mechanism -- to match types to the given PatternType. This information on -- types/type expressions is taken from HIE files in a more -- suitable view. -- -- Let's take a look at the function foo: -- --
-- foo :: NonEmpty String -> Int ---- -- In HIE files it will be stored as an Array like this: -- --
-- 1 -> Int [] -- 2 -> String [] -- 3 -> NonEmpty [ 2 ] -- 4 -> FunType 3 1 ---- -- This module contains an implementation of the process of retrieval of -- this information from there. module Stan.Hie.MatchType -- | Matching function that searches the array of types recursively. hieMatchPatternType :: Array TypeIndex HieTypeFlat -> PatternType -> TypeIndex -> Bool -- | Some Inspections require to know about AST and some mechanism -- to match parts of syntax tree to the given PatternAst. This -- information on AST expressions is taken from HIE files in a -- more suitable view. -- -- This module contains an implementation of the process of retrieval of -- AST information from HIE files. module Stan.Hie.MatchAst -- | Matching function that matches current AST node with a given pattern. hieMatchPatternAst :: HieFile -> HieAST TypeIndex -> PatternAst -> Bool -- | Css to be used in the generated HTML in the report. module Stan.Report.Css stanCss :: Css -- | Report settings types. module Stan.Report.Settings -- | Settings for produced report. data ReportSettings ReportSettings :: !Verbosity -> !ToggleSolution -> ReportSettings [reportSettingsVerbosity] :: ReportSettings -> !Verbosity [reportSettingsSolutionVerbosity] :: ReportSettings -> !ToggleSolution data Verbosity Verbose :: Verbosity NonVerbose :: Verbosity isVerbose :: Verbosity -> Bool -- | Boolean for showing/hiding solution information of observations. data ToggleSolution HideSolution :: ToggleSolution ShowSolution :: ToggleSolution -- | Is the toggle option set to HideSolution? isHidden :: ToggleSolution -> Bool instance GHC.Show.Show Stan.Report.Settings.ToggleSolution instance GHC.Show.Show Stan.Report.Settings.Verbosity -- | This module introduces Severity data type for expressing how -- severe the message is. Also, it contains useful functions to work with -- Severity. module Stan.Severity -- | Severity level of the inspection. -- -- TODO: table data Severity -- | Code style issues. Usually harmless. Style :: Severity -- | Serious defects that could cause slowness and space leaking. Performance :: Severity -- | Human errors in code. PotentialBug :: Severity -- | Potential runtime errors on some inputs. Warning :: Severity -- | Dangerous behaviour. Error :: Severity -- | Description of each Severity level. severityDescription :: Severity -> Text -- | Get the colour of the severity level. severityColour :: Severity -> Text -- | Show Severity in a human-friendly format. prettyShowSeverity :: Severity -> Text instance GHC.Enum.Bounded Stan.Severity.Severity instance GHC.Enum.Enum Stan.Severity.Severity instance GHC.Classes.Ord Stan.Severity.Severity instance GHC.Classes.Eq Stan.Severity.Severity instance GHC.Read.Read Stan.Severity.Severity instance GHC.Show.Show Stan.Severity.Severity -- | Inspection — check or test provided by Stan. module Stan.Inspection -- | Data type that represents a check/test, or how we call it -- inspection that is provided by the Stan tool. data Inspection Inspection :: !Id Inspection -> !Text -> !Text -> ![Text] -> !NonEmpty Category -> !Severity -> !InspectionAnalysis -> Inspection [inspectionId] :: Inspection -> !Id Inspection [inspectionName] :: Inspection -> !Text [inspectionDescription] :: Inspection -> !Text [inspectionSolution] :: Inspection -> ![Text] [inspectionCategory] :: Inspection -> !NonEmpty Category [inspectionSeverity] :: Inspection -> !Severity [inspectionAnalysis] :: Inspection -> !InspectionAnalysis categoryL :: Lens' Inspection (NonEmpty Category) descriptionL :: Lens' Inspection Text solutionL :: Lens' Inspection [Text] severityL :: Lens' Inspection Severity analysisL :: Lens' Inspection InspectionAnalysis -- | Data type that represents all possible types of stan -- inspections in a uniformed way. data InspectionAnalysis -- | Find the specific part of the Haskell AST (including specific -- functions). FindAst :: !PatternAst -> InspectionAnalysis -- | Find all operators without matching infix[r|l] Infix :: InspectionAnalysis -- | Check if the data type has lazy fields LazyField :: InspectionAnalysis -- | Usage of tuples with size >= 4 BigTuples :: InspectionAnalysis -- | Pattern matching on _ for sum types. PatternMatchOn_ :: InspectionAnalysis -- | Replace multiple comparison operations with compare UseCompare :: InspectionAnalysis -- | Type alias for the HashMap that contains pairs of inspections -- Ids and corresponding Inspections. type InspectionsMap = HashMap (Id Inspection) Inspection -- | Sort Inspection by Id sortById :: InspectionsMap -> [Inspection] -- | Show Inspection in a human-friendly format. prettyShowInspection :: Inspection -> Text -- | Show the short view of a given Inspection. prettyShowInspectionShort :: Inspection -> Text -- | 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. inspectionsMd :: [Inspection] -> Text instance GHC.Classes.Eq Stan.Inspection.Inspection instance GHC.Show.Show Stan.Inspection.Inspection instance GHC.Classes.Eq Stan.Inspection.InspectionAnalysis instance GHC.Show.Show Stan.Inspection.InspectionAnalysis -- | Contains all Inspections for style improvements. -- -- The style inspections are in ranges: -- --
STAN-0301 .. STAN-0400
STAN-0001 .. STAN-0100
STAN-0101 .. STAN-0200
STAN-0201 .. STAN-0300
-- OBS-STAN-XXXX-module-name-hash-10:42 --mkObservationId :: Id Inspection -> ModuleName -> RealSrcSpan -> Id Observation ignoredObservations :: [Id Observation] -> Observations -> ([Id Observation], [Id Observation]) -- | Show Observation in a human-friendly format. prettyShowObservation :: ReportSettings -> Observation -> Text prettyShowIgnoredObservations :: [Id Observation] -> Observations -> Text prettyObservationSource :: Bool -> Observation -> [Text] instance GHC.Classes.Eq Stan.Observation.Observation instance GHC.Show.Show Stan.Observation.Observation -- | File (or module) specific information. module Stan.FileInfo type FileMap = Map FilePath FileInfo -- | File specific information. data FileInfo FileInfo :: !FilePath -> !ModuleName -> !Int -> !Either ExtensionsError ParsedExtensions -> !Either ExtensionsError ParsedExtensions -> !ExtensionsResult -> !Observations -> FileInfo [fileInfoPath] :: FileInfo -> !FilePath [fileInfoModuleName] :: FileInfo -> !ModuleName [fileInfoLoc] :: FileInfo -> !Int [fileInfoCabalExtensions] :: FileInfo -> !Either ExtensionsError ParsedExtensions [fileInfoExtensions] :: FileInfo -> !Either ExtensionsError ParsedExtensions [fileInfoMergedExtensions] :: FileInfo -> !ExtensionsResult [fileInfoObservations] :: FileInfo -> !Observations -- | Return the list of pretty-printed extensions. extensionsToText :: Either ExtensionsError ParsedExtensions -> [Text] -- | Check whether the given extension is disabled isExtensionDisabled :: Extension -> ExtensionsResult -> Bool instance GHC.Classes.Eq Stan.FileInfo.FileInfo instance GHC.Show.Show Stan.FileInfo.FileInfo -- | Analysing functions by InspectionAnalysis for the corresponding -- Inspection. module Stan.Analysis.Analyser -- | Create analysing function for Inspection by pattern-matching -- over InspectionAnalysis. analysisByInspection :: ExtensionsResult -> Inspection -> HieFile -> Observations -- | Static analysis of all HIE files. module Stan.Analysis -- | This data type stores all information collected during static -- analysis. data Analysis Analysis :: !Int -> !Int -> !(Set OnOffExtension, Set SafeHaskellExtension) -> !HashSet (Id Inspection) -> !Observations -> !Observations -> !FileMap -> Analysis [analysisModulesNum] :: Analysis -> !Int [analysisLinesOfCode] :: Analysis -> !Int [analysisUsedExtensions] :: Analysis -> !(Set OnOffExtension, Set SafeHaskellExtension) [analysisInspections] :: Analysis -> !HashSet (Id Inspection) [analysisObservations] :: Analysis -> !Observations [analysisIgnoredObservations] :: Analysis -> !Observations [analysisFileMap] :: Analysis -> !FileMap -- | Perform static analysis of given HieFile. runAnalysis :: Map FilePath (Either ExtensionsError ParsedExtensions) -> HashMap FilePath (HashSet (Id Inspection)) -> [Id Observation] -> [HieFile] -> Analysis instance GHC.Show.Show Stan.Analysis.Analysis -- | Pretty printing of Stan's analysis. module Stan.Analysis.Pretty -- | Shows analysed output of Stan work. This functions groups -- Observations by FilePath they are found in. prettyShowAnalysis :: Analysis -> ReportSettings -> Text data AnalysisNumbers AnalysisNumbers :: !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Double -> AnalysisNumbers [anModules] :: AnalysisNumbers -> !Int [anLoc] :: AnalysisNumbers -> !Int [anExts] :: AnalysisNumbers -> !Int [anSafeExts] :: AnalysisNumbers -> !Int [anIns] :: AnalysisNumbers -> !Int [anFoundObs] :: AnalysisNumbers -> !Int [anIgnoredObs] :: AnalysisNumbers -> !Int [anHealth] :: AnalysisNumbers -> !Double -- | Enum to describe project health depending on the value of -- anHealth. data ProjectHealth Unhealthy :: ProjectHealth LowHealth :: ProjectHealth MediumHealth :: ProjectHealth Healthy :: ProjectHealth analysisToNumbers :: Analysis -> AnalysisNumbers -- | Show project health as pretty text with 2 digits after dot. prettyHealth :: Double -> Text -- | Calculate ProjectHealth. toProjectHealth :: Double -> ProjectHealth -- | stan runtime configuration that allows customizing the set of -- inspections to check the code against. module Stan.Config -- | Main configuration type for the following purposes: -- --
-- ⓘ Reading Configurations from /home/vrom911/Kowainik/stan/.stan.toml ... -- stan check --exclude --directory=test/ \ -- check --include \ -- check --exclude --inspectionId=STAN-0002 \ -- check --exclude --inspectionId=STAN-0001 --file=src/MyFile.hs -- remove --file=src/Secret.hs -- ignore --id="STAN0001-asdfgh42:42" --configToCliCommand :: Config -> Text -- | Apply configuration to the given list of files to get the set of -- inspections for each file. -- -- The algorithm: -- --
-- stan toml-to-cli --StanTomlToCli :: !TomlToCliArgs -> StanCommand -- |
-- stan cli-to-toml --StanCliToToml :: !CliToTomlArgs -> StanCommand -- |
-- stan inspections-to-md --StanInspectionsToMd :: StanCommand -- | Options used for the main stan command. data StanArgs StanArgs :: !FilePath -> ![FilePath] -> !ReportSettings -> !Bool -> !TaggedTrial Text Bool -> !Maybe FilePath -> !PartialConfig -> StanArgs -- | Directory with HIE files [stanArgsHiedir] :: StanArgs -> !FilePath -- | Path to .cabal files. [stanArgsCabalFilePath] :: StanArgs -> ![FilePath] -- | Settings for report [stanArgsReportSettings] :: StanArgs -> !ReportSettings -- | Create HTML report? [stanArgsReport] :: StanArgs -> !Bool -- | Use default .stan.toml file [stanArgsUseDefaultConfigFile] :: StanArgs -> !TaggedTrial Text Bool -- | Path to a custom configurations file. [stanArgsConfigFile] :: StanArgs -> !Maybe FilePath [stanArgsConfig] :: StanArgs -> !PartialConfig -- | Options used for the stan inspection command. newtype InspectionArgs InspectionArgs :: Maybe (Id Inspection) -> InspectionArgs [inspectionArgsId] :: InspectionArgs -> Maybe (Id Inspection) -- | Options used for the stan toml-to-cli command. newtype TomlToCliArgs TomlToCliArgs :: Maybe FilePath -> TomlToCliArgs [tomlToCliArgsFilePath] :: TomlToCliArgs -> Maybe FilePath -- | Options used for the stan cli-to-toml command. data CliToTomlArgs CliToTomlArgs :: !Maybe FilePath -> !PartialConfig -> CliToTomlArgs [cliToTomlArgsFilePath] :: CliToTomlArgs -> !Maybe FilePath [cliToTomlArgsConfig] :: CliToTomlArgs -> !PartialConfig -- | Run main parser of the stan command line tool. runStanCli :: IO StanCommand -- | To turn on some special options. stanParserPrefs :: ParserPrefs stanCliParser :: ParserInfo StanCommand -- | Static analysis summary. module Stan.Analysis.Summary -- | Short info about analysis. data Summary Summary :: !Id Inspection -> !Category -> !ModuleName -> !Severity -> Summary -- | The most popular Inspection [summaryInspectionId] :: Summary -> !Id Inspection -- | The most popular Category [summaryCategory] :: Summary -> !Category -- | Module with the biggest number of observations [summaryModule] :: Summary -> !ModuleName -- | The highest Severity [summarySeverity] :: Summary -> !Severity -- | Assemble Summary after analysis. Returns Nothing when -- there's no Observations. Otherwise, there's at least one -- observation, which means that we can find the most popular -- Inspection, Category and the highest Severity. createSummary :: Analysis -> Maybe Summary -- | HTML to be generated in the report. module Stan.Report.Html stanHtml :: Analysis -> Config -> [Text] -> StanEnv -> ProjectInfo -> Html -- | Report and report settings types. module Stan.Report generateReport :: Analysis -> Config -> [Text] -> StanEnv -> ProjectInfo -> IO () -- | tomland library integration. TomlCodecs for the -- Config data type. module Stan.Toml getTomlConfig :: Bool -> Maybe FilePath -> IO PartialConfig configCodec :: TomlCodec PartialConfig -- | Based on the incoming settings returns the TOML configuration files -- that were used to get the final config. usedTomlFiles :: Bool -> Maybe FilePath -> IO [FilePath] -- | Main running module. module Stan run :: IO () -- | From a given path to cabal files and HieFiles create the map -- from modules (that are in .cabal file) to the resulting parsed -- extensions for each. createCabalExtensionsMap :: [FilePath] -> [HieFile] -> IO (Map FilePath (Either ExtensionsError ParsedExtensions))