mgechev / revive

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

Rule optimize-operands-order: do not consider built-in len as a caller #1005

Closed moukoublen closed 5 days ago

moukoublen commented 6 days ago

Update rule optimize-operands-order, isCaller logic to not consider built-in function len as a caller.

Closes #1004

chavacava commented 5 days ago

Hi @moukoublen, thanks for the PR. (I'm sure in the future somebody will ask for a configurable list of functions to ignore but let things simple for the moment)