Closed denisvmedia closed 8 months ago
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems.
That's true, but considering there's no way to address the issue, should I submit a new PR? 😉 P. S. I actually initially proposed multiple args 😊
@denisvmedia a PR will be welcome. Thank you!
In my initial PR about adding
import-alias-naming
we agreed to have only one expression. However, I'm now not able to easily solve the following limitation:^[a-z][a-z0-9]*
)^v\d+$
aliases (e.g.v1
)^v\d+alpha\d+$
aliases (e.g.v1alpha1
)In my PR I assumed that golang supports negative lookahead. Unfortunately, my assumption was wrong (as well as there's no support for positive lookahead, also in regex there's no general support for logical
AND
). Do you think, we can revise our decision and allow multiple rules that will be combined by logicalAND
? @chavacavaI can submit a PR with an update (it will be backwards compatible).