crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.2k stars 1.61k forks source link

Force named arguments for spec methods #14759

Open straight-shoota opened 5 days ago

straight-shoota commented 5 days ago

Spec methods like describe, it, etc. accept a number of positional parameters. Only the first one, description is really a good positional parameter. The others are options which should be passed as named arguments. Without a name there's no intuitive understanding what order the parameters would go in (did you know the second one is file?, ref #14757).

We should force all parameters after description to be named arguments.