diff options
author | stuebinm | 2021-12-30 23:35:10 +0100 |
---|---|---|
committer | stuebinm | 2021-12-30 23:35:10 +0100 |
commit | 8f292660630b3154a3441cc673d6aa605f668e5b (patch) | |
tree | 183d57f89c9dd8811d2cf7141d63a13d7df18074 /lib/CheckDir.hs | |
parent | 09f6bbdad52e58a3d128c9806078d359832f07e1 (diff) |
add dot language output for repository map graphs
Diffstat (limited to '')
-rw-r--r-- | lib/CheckDir.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CheckDir.hs b/lib/CheckDir.hs index cb4f886..1f69abf 100644 --- a/lib/CheckDir.hs +++ b/lib/CheckDir.hs @@ -25,7 +25,7 @@ import Data.Maybe (isJust, mapMaybe) import Data.Text (Text, isInfixOf) import qualified Data.Text as T import Dirgraph (graphToDot, invertGraph, resultToGraph, - unreachableFrom) + takeSubGraph, unreachableFrom) import GHC.Generics (Generic) import LintConfig (LintConfig', configMaxLintLevel) import Paths (normalise, normaliseWithFrag) @@ -107,7 +107,7 @@ instance ToJSON DirResult where . M.toList $ dirresultMaps res) -- unused in the hub, temporarily removed to make the output smaller - -- , "exitGraph" .= showDot (dirresultGraph res) + , "exitGraph" .= showDot (dirresultGraph res) ] , "severity" .= maximumLintLevel res , "mapInfo" .= fmap (\tm -> A.object [ "badges" .= mapresultBadges tm ]) @@ -178,7 +178,10 @@ recursiveCheckDir config prefix root = do pure $ DirResult { dirresultDeps = missingDeps root maps' , dirresultMissingAssets = mAssets , dirresultMaps = maps' - , dirresultGraph = graphToDot exitGraph + , dirresultGraph = + graphToDot + . takeSubGraph 7 root + $ exitGraph } |