stil4m/elm-analyse

Option to not load certain files

sparksp opened this issue · 0 comments

I have an elm file that's approximately 75k lines, auto-generated from a CSS library to provide a function per class name. It takes elm-analyse anywhere from 3 to 6 minutes to parse this file, so I've added it to the excludedPaths list. However it's still loaded & parsed, it's just the results are not output. Is this by design? If so, can an option be added for files that we don't want to load at all?

We can see in the Analyser below the parsedFiles are being filtered (once loaded):

isSourceFileIncluded : Configuration -> LoadedSourceFile -> Bool
isSourceFileIncluded configuration =
Tuple.first
>> .path
>> (\a -> Configuration.isPathExcluded a configuration)
>> not
finishProcess : SourceLoadingStage.Model -> Cmd SourceLoadingStage.Msg -> Model -> ( Model, Cmd Msg )
finishProcess newStage cmds model =
let
loadedSourceFiles =
SourceLoadingStage.parsedFiles newStage
includedSources =
List.filter (isSourceFileIncluded model.configuration) loadedSourceFiles

I'm happy to help build and test the resolution for this, but wanted some confirmation of what direction to take first.