rspec/rules/S2302/description.adoc

4 lines
313 B
Plaintext
Raw Normal View History

2020-12-23 14:59:06 +01:00
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
2020-12-23 14:59:06 +01:00
This rule raises an issue when a string in the ``throw`` statement contains the name of one of the method parameters.