-
Notifications
You must be signed in to change notification settings - Fork 380
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
Support wildcards in resolve directives #817
Labels
Comments
Hey, any update on this issue? |
DolceTriade
added a commit
to DolceTriade/bazel-gazelle
that referenced
this issue
May 23, 2023
Similar to the resolve directive, resolve_regexp will match the import string against a regex instead of a direct string match. This is useful when matching protos which are part of single rule. Fixes bazel-contrib#817
DolceTriade
added a commit
to DolceTriade/bazel-gazelle
that referenced
this issue
May 25, 2023
Similar to the resolve directive, resolve_regexp will match the import string against a regex instead of a direct string match. This is useful when matching protos which are part of single rule. Fixes bazel-contrib#817
DolceTriade
added a commit
to DolceTriade/bazel-gazelle
that referenced
this issue
Jun 21, 2023
Similar to the resolve directive, resolve_regexp will match the import string against a regex instead of a direct string match. This is useful when matching protos which are part of single rule. Fixes bazel-contrib#817
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This came up in discussion in #771.
Currently,
resolve
directives have two forms:We currently don't support any form of wildcard, so if a repository needs to use
resolve
directives for a large number of rules (for example, when using a custom naming convention or a large number of rules in a directory), it needs a large number ofresolve
directives, which can be very repetitively.We should support some sort of wildcard in the
import-string
which could also appear in thedep-string
. The simplest and most familiar way to do this would probably be to introduce aresolve_regexp
directive, whereimport-string
is a regular expression, anddep-string
is something that could be passed toregexp.ReplaceAll
(with$1
and so on for matched groups).The text was updated successfully, but these errors were encountered: