Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not load certain files #233

Open
sparksp opened this issue Apr 7, 2020 · 0 comments
Open

Option to not load certain files #233

sparksp opened this issue Apr 7, 2020 · 0 comments

Comments

@sparksp
Copy link

sparksp commented Apr 7, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant