-
Notifications
You must be signed in to change notification settings - Fork 136
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
Skip indexing of generated files #1255
Conversation
For now the mechanism only supports files tagged as generated via their header. This mechanism can later be expanded based on interest (eg via regex, application, size, etc)
apps/els_lsp/src/els_indexing.erl
Outdated
SkipGeneratedFiles = els_config_indexing:get_skip_generated_files(), | ||
GeneratedFilesTag = els_config_indexing:get_generated_files_tag(), | ||
try_index_file(Path, 'deep', SkipGeneratedFiles, GeneratedFilesTag), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two values are always passed in together - should they be made into just one accessor? Something like:
els_config_indexing:skip_generated_config()
which would return disabled | {enabled, Tag}
It should simplify the code and follow the "make impossible states unrepresentable" approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot, but let's do this as a follow up. The main reason is that the whole config management needs refactoring, so it would be nice to come up with a common pattern.
2ed1070
to
0c34080
Compare
No description provided.