-
Notifications
You must be signed in to change notification settings - Fork 382
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
Feature Request: flag to limit languages processed #687
Comments
How are you invoking Gazelle usually? This seems reasonable for people invoking Gazelle manually (without For people using the |
I'm invoking it via bazel rules. I guess the real reason I'm interested in this feature is that Gazelle logs errors on unrecognized directives. Running it for Go logs ~20 lines about JS directives that it doesn't recognize. |
Ah, that makes sense. That does seem like a good reason to have a It should probably be a flag in |
This adds a `-lang` flag and `gazelle:lang` directive to restrict the languages composed by Gazelle. Fixes bazel-contrib#687
Sorry for the delay -- PR is up. I also added it as a directive, because I recall you saying that flags should generally be overridable by directives. I can remove one or the other if you prefer, either mechanism works for my use case. |
This adds a `-lang` flag and `gazelle:lang` directive to restrict the languages composed by Gazelle. Fixes bazel-contrib#687
This adds a `-lang` flag and `gazelle:lang` directive to restrict the languages composed by Gazelle. Fixes bazel-contrib#687
This adds a `-lang` flag and `gazelle:lang` directive to restrict the languages composed by Gazelle. Fixes #687
I have the following scenario:
Right now, there's no way to do that. If I run this Gazelle binary against our Go codebase, it will produce undesirable rules for any JS files checked in there.
I want to propose a new flag,
--lang
, which is a comma separated list of languages. It defaults to empty string, which has no effect.It would be implemented as a flag in
updateReposConfigurer
, filtering based onlanguage.Language.Name()
.I think that's all it would take, although I haven't tested it out.
If this sounds good to you, I'll put together a PR.
Thanks!
The text was updated successfully, but these errors were encountered: