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

Make it possible to subscribe a linter to files of any type. #248

Closed
bolinfest opened this issue Nov 11, 2014 · 2 comments
Closed

Make it possible to subscribe a linter to files of any type. #248

bolinfest opened this issue Nov 11, 2014 · 2 comments

Comments

@bolinfest
Copy link

Currently, LinterView::initLinters() checks to see whether the grammar of the current file is in the linter.syntax array when deciding whether to register a linter. For performance reasons, this makes a lot of sense, but it would be nice to be able to specify a wildcard to say "always associate my linter."

I am trying to add a linter for Arcanist, which has an arc lint subcommand. Basically, you can have a large project of all sorts of source files and register linters for them and arc lint <filename> will run the appropriate linter(s) and print the results. Therefore, I want to run arc lint whenever any file is changed in Atom. In this scenario, Arcanist is responsible for mapping file extensions to linters. Since I am already using Arcanist, I don't want to duplicate this information in Atom.

@bolinfest
Copy link
Author

My current thought for a workaround is to do:

    syntax = atom.syntax.grammars.map(function(grammar) { return grammar.scopeName; });

@keplersj
Copy link
Contributor

keplersj commented Aug 2, 2015

This exists. Just use a wildcard (*) in your grammar scopes.

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

No branches or pull requests

5 participants