Closed attah closed 1 year ago
I think this is a great idea. I would use '_'
as the "anything" pattern and maybe consider accepting {module_name, function_name}
tuples to indicate "any arity", but I do like the idea.
Right, underscore is a lot more "Erlang". Not sold on the two-tuple though; why not just wildcard arity?
Yeah, wildcard ariity is fine.
Looks like your two-tuple may already work. https://github.com/inaka/elvis_core/blob/361e26f6c0d0a990dce412b8bcf768cb27c9ae48/src/elvis_style.erl#L1974
And it looks like it will be very easy to add what i want... let's see if i can't get some time for this soon.
Is your feature request related to a problem? Please describe
Wildcards in no_call_functions MFA, i.e. rules that applies regardless of module name and/or function name and/or arity.
Describe the solution you'd like
Being able to do:
Describe alternatives you've considered
Dynamically generating rule definitions... too much work.
Additional Context
It is ridiculous to test a state machine without a running process, and with state data that it has not produced itself. Running the statem/server callbacks explicitly from tests is the biggest antipattern i know in testing.