rspec/rules/S935/description.adoc

5 lines
385 B
Plaintext
Raw Normal View History

2020-06-30 12:50:59 +02:00
Every call to a function with a non-void return type is expected to return some value. Including a return path in a non-void function that does not explicitly return a value results in undefined behavior.
2021-02-02 15:02:10 +01:00
2020-06-30 12:50:59 +02:00
Conversely, every call to a function with a void return type is expected to not return any value. Returning a value from a void function probably indicates a programming error.