@@ -43,12 +43,11 @@ import Ide.Types (PluginDescriptor (..),
43
43
defaultPluginDescriptor )
44
44
import qualified Language.LSP.Types as LSP
45
45
import Stan.Analysis (Analysis (.. ), runAnalysis )
46
- import Stan.Category (prettyShowCategory )
46
+ import Stan.Category (Category ( .. ) )
47
47
import Stan.Core.Id (Id (.. ))
48
48
import Stan.Inspection (Inspection (.. ))
49
49
import Stan.Inspection.All (inspectionsIds , inspectionsMap )
50
50
import Stan.Observation (Observation (.. ))
51
- import Stan.Severity (prettyShowSeverity )
52
51
53
52
descriptor :: Recorder (WithPriority Log ) -> PluginId -> PluginDescriptor IdeState
54
53
descriptor recorder plId = (defaultPluginDescriptor plId) {pluginRules = rules recorder}
@@ -94,15 +93,16 @@ rules recorder = do
94
93
let
95
94
-- Looking similar to Stan CLI output
96
95
-- We do not use `prettyShowInspection` cuz Id is redundant here
96
+ -- `prettyShowSeverity` and `prettyShowCategory` would contain color
97
+ -- codes and are replaced, too
97
98
message :: T. Text
98
99
message =
99
100
T. unlines $
100
101
[ " ✲ Name: " <> inspectionName inspection,
101
102
" ✲ Description: " <> inspectionDescription inspection,
102
- " ✲ Severity: " <> (prettyShowSeverity $
103
- inspectionSeverity inspection),
103
+ " ✲ Severity: " <> (T. pack $ show $ inspectionSeverity inspection),
104
104
" ✲ Category: " <> T. intercalate " "
105
- (map prettyShowCategory $ toList $ inspectionCategory inspection),
105
+ (map (( " # " <> ) . unCategory) $ toList $ inspectionCategory inspection),
106
106
" Possible solutions:"
107
107
]
108
108
++ map (" - " <> ) (inspectionSolution inspection)
0 commit comments