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

Discard diagnostics in a few cases #1816

Merged
merged 5 commits into from
Aug 5, 2021
Merged

Conversation

rwols
Copy link
Member

@rwols rwols commented Jul 31, 2021

  • When the file is outside the window folders, ignore diagnostics
  • When the file matches binary_exclude_patterns, ignore it
  • When the file matches file_exclude_patterns, ignore it
  • When the file matches folder_exclude_patterns, ignore it

This doesn't take care of the index_exclude_patterns and
index_exclude_gitignore settings.

Resolves #1727

rwols added 2 commits July 31, 2021 15:43
- When the file is outside the window folders, ignore diagnostics
- When the file matches binary_exclude_patterns, ignore it
- When the file matches file_exclude_patterns, ignore it
- When the file matches folder_exclude_patterns, ignore it

This doesn't take care of the index_exclude_patterns and
index_exclude_gitignore settings.
plugin/core/windows.py Outdated Show resolved Hide resolved
plugin/core/sessions.py Outdated Show resolved Hide resolved
Comment on lines 452 to 453
settings = view.settings()
if self._matches_glob(path, settings.get("binary_file_patterns")):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this in my project:

Screenshot 2021-08-01 at 10 24 10

and this are the view settings (the view is within the workspace):

>>> view.settings().get('folder_exclude_patterns')
['.svn', '.git', '.hg', 'CVS', '.mypy_cache', 'node_modules']

It looks like the .nuxt is missing (node_modules comes from global override). So are the view settings not actually updated with project overrides?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I can reproduce this behavior here as well. Seems broken to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rwols
Copy link
Member Author

rwols commented Aug 5, 2021

I'll go ahead and merge this as this has some benefit already. The index_exclude_patterns and project-specific exclude patterns are really more of an ST issue.

@rwols rwols merged commit ba2d081 into main Aug 5, 2021
@rwols rwols deleted the feat/discard-some-diagnostics branch August 5, 2021 21:30
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

Successfully merging this pull request may close these issues.

Do not render diagnostics in certain cases
2 participants