rspec/rules/S5843/exceptions.adoc
Johann Beleites 903426703f
Create rule S5843[kotlin]: Regular expressions should not be too complicated (#416)
Co-authored-by: Margarita Nedzelska <margarita.nedzelska@sonarsource.com>
2021-11-03 16:33:50 +00:00

8 lines
394 B
Plaintext

== Exceptions
Regular expressions are only analyzed if all parts of the regular expression are either string literals, effectively final local variables or ``++static final++`` fields, all of which can be combined using the \'``+``' operator.
When a regular expression is split among multiple variables or commented lines, each part is only analyzed if it is syntactically valid by itself.