Add implicit-str-concat
& inconsistent-return-statements
check
#3882
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
implicit-str-concat
rule ensures that the string concatenation is done implicitly in an assignment statement using an explicit operator, such as+
or other methods like string-formatting, etc. This can improve code readability and reduce the likelihood of introducing errors related to string concatenation.The
inconsistent-return-statements
rule raises an error when a function has multiple return statements, and some of them return an expression while others do not. This can lead to unexpected behavior and make the code harder to understand. The check ensures that the function has consistent return statements and that it always returns an expression or none of them return an expression, making the code more predictable and easier to understand.