You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Is your feature request related to a problem? Please describe.
I often want to discourage the use of certain arities of functions.
For example, in the case of clojure.core/map I like to see the 1-arity being used, which returns a transducer. However its higher arities return lazy sequences which I consider a mediocre abstraction for most of the cases I encounter. I would like clj-kondo to help me identify these calls so I can decide whether they are justified or not.
Describe the solution you'd like
As per this slack thread the suggestion is to extend the :discouraged-var linter to allow specifying arities that are discouraged through something like a block list :arities #{2, 3, :varargs} or allowing for certain arities :allow-arities #{1}
Describe alternatives you've considered
If intermediate lazy sequences are generally considered an anti-pattern then there could exist a more specific linter.
The text was updated successfully, but these errors were encountered:
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Is your feature request related to a problem? Please describe.
I often want to discourage the use of certain arities of functions.
For example, in the case of
clojure.core/map
I like to see the 1-arity being used, which returns a transducer. However its higher arities return lazy sequences which I consider a mediocre abstraction for most of the cases I encounter. I would like clj-kondo to help me identify these calls so I can decide whether they are justified or not.Describe the solution you'd like
As per this slack thread the suggestion is to extend the
:discouraged-var
linter to allow specifying arities that are discouraged through something like a block list:arities #{2, 3, :varargs}
or allowing for certain arities:allow-arities #{1}
Describe alternatives you've considered
If intermediate lazy sequences are generally considered an anti-pattern then there could exist a more specific linter.
The text was updated successfully, but these errors were encountered: