rspec/rules/S2302/description.adoc

4 lines
313 B
Plaintext
Raw Normal View History

Because parameter names could be changed during refactoring, they should not be spelled out literally in strings. Instead, use `+nameof()+`, and the string that's output will always be correct.
2020-06-30 12:48:07 +02:00
This rule raises an issue when a string in the `+throw+` statement contains the name of one of the method parameters.