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

enable selector-specific stdin filename for buffers #326

Merged

Conversation

dndrsn
Copy link

@dndrsn dndrsn commented Dec 29, 2022

Adds logic to use selector specific dummy filenames for unsaved buffers. Replaces dummy filenames with "stdin" when parsing linter output in the same manner that is currently implemented for "".

Also includes the addition of plugin support for 2 common YAML plugins. These additions are not core to this change, but are related and necessary to add dummy file extension support for YAML.

A further improvement to this change would be to move the mapping of selectors to file extensions to the config file, but because this is closely coupled to the plugins config, it would make sense to move both to the config file (if possible) at the same time.

@dndrsn dndrsn force-pushed the selector-specific-buffer-filename branch from d75c8c3 to 140e691 Compare December 29, 2022 19:00
@dndrsn
Copy link
Author

dndrsn commented Dec 29, 2022

FYI. Added comment to disable linter error on line 25. This appears to be a preexisting issue. It's unclear to me what the purpose of this line is.

linter.py Outdated Show resolved Hide resolved
linter.py Outdated Show resolved Hide resolved
linter.py Outdated Show resolved Hide resolved
linter.py Show resolved Hide resolved
linter.py Outdated Show resolved Hide resolved
Copy link
Contributor

@kaste kaste left a comment

Choose a reason for hiding this comment

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

I did some remarks here but I really like the approach and PR.

@dndrsn dndrsn force-pushed the selector-specific-buffer-filename branch from 380be4c to 2be661f Compare December 30, 2022 15:12
@dndrsn dndrsn requested a review from kaste December 30, 2022 15:32
linter.py Outdated Show resolved Hide resolved
Copy link
Contributor

@kaste kaste left a comment

Choose a reason for hiding this comment

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

Beside the type annotation thing, this is fine and can be merged.

@dndrsn dndrsn force-pushed the selector-specific-buffer-filename branch from 7653f3a to ad8dbe1 Compare December 30, 2022 22:17
@dndrsn dndrsn requested a review from kaste December 30, 2022 22:18
@kaste
Copy link
Contributor

kaste commented Jan 7, 2023

Let's do this. LGTM.

@kaste kaste merged commit 128563c into SublimeLinter:master Jan 7, 2023
@kaste kaste mentioned this pull request Nov 9, 2023
kaste added a commit that referenced this pull request Nov 11, 2023
If we use SublimeLinters standard way of injecting variables, we don't
need the watch out for `$` characters because SublineLinter will do.
This is what we did before #326 as well.

This is a follow-up of #331.
kaste added a commit that referenced this pull request Nov 11, 2023
If we use SublimeLinters standard way of injecting variables, we don't
need to watch out for `$` characters because SublineLinter will do.
This is what we did before #326 as well.

This is a follow-up of #331.
kaste added a commit that referenced this pull request Nov 11, 2023
If we use SublimeLinter's standard way of injecting variables, we don't
need to watch out for `$` characters because SublineLinter will do.
This is what we did before #326 as well.

This is a follow-up of #331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants