@@ -169,20 +169,20 @@ rules recorder plId = do
169
169
relativeHsFilePath <- liftIO $ makeRelativeToCurrentDirectory $ fromNormalizedFilePath file
170
170
let hieRelative = hie{hie_hs_file= relativeHsFilePath}
171
171
172
- (cabalExtensionsMap, checksMap, confIgnored ) <- case configTrial of
172
+ (checksMap, ignoredObservations ) <- case configTrial of
173
173
FiascoL es -> do
174
174
logWith recorder Development.IDE. Warning (LogWarnConf es)
175
- pure (Map. empty,
176
- HM. fromList [(LSP. fromNormalizedFilePath file, inspectionsIds)],
177
- [] )
178
- ResultL warnings stanConfig -> do
179
- -- A Map from *relative* file paths (just one, in this case) to language extension info.
180
- cabalExtensionsMap <- liftIO $ createCabalExtensionsMap isLoud (stanArgsCabalFilePath stanArgs) [hieRelative]
175
+ -- If we can't read the config file, default to using all inspections:
176
+ let allInspections = HM. fromList [(relativeHsFilePath, inspectionsIds)]
177
+ pure (allInspections, [] )
178
+ ResultL _warnings stanConfig -> do
181
179
-- HashMap of *relative* file paths to info about enabled checks for those file paths.
182
180
let checksMap = applyConfig [relativeHsFilePath] stanConfig
183
- pure (cabalExtensionsMap, checksMap, configIgnored stanConfig)
181
+ pure (checksMap, configIgnored stanConfig)
184
182
185
- let analysis = runAnalysis cabalExtensionsMap checksMap confIgnored [hieRelative]
183
+ -- A Map from *relative* file paths (just one, in this case) to language extension info:
184
+ cabalExtensionsMap <- liftIO $ createCabalExtensionsMap isLoud (stanArgsCabalFilePath stanArgs) [hieRelative]
185
+ let analysis = runAnalysis cabalExtensionsMap checksMap ignoredObservations [hieRelative]
186
186
return (analysisToDiagnostics file analysis, Just () )
187
187
else return ([] , Nothing )
188
188
0 commit comments