mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.69k stars 273 forks source link

Supporting multiple expressions for import-alias-naming #924

Closed denisvmedia closed 8 months ago

denisvmedia commented 8 months ago

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:

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 logical AND? @chavacava

I can submit a PR with an update (it will be backwards compatible).

chavacava commented 8 months ago

Some people, when confronted with a problem, think “I know, I'll use regular expressions.Now they have two problems.

denisvmedia commented 8 months ago

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 😊

chavacava commented 8 months ago

@denisvmedia a PR will be welcome. Thank you!