rspec/rules/S3400/description.adoc

5 lines
404 B
Plaintext
Raw Normal View History

2020-06-30 12:48:39 +02:00
There's no point in forcing the overhead of a method call for a method that always returns the same constant value. Even worse, the fact that a method call must be made will likely mislead developers who call the method thinking that something more is done. Declare a constant instead.
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
This rule raises an issue if on methods that contain only one statement: the ``++return++`` of a constant value.