rspec/rules/S6326/java/rule.adoc
2022-04-28 09:22:27 +02:00

22 lines
542 B
Plaintext

include::../description.adoc[]
== Noncompliant Code Example
[source,java]
----
Pattern.compile("hello world");
----
== Compliant Solution
[source,java]
----
Pattern.compile("hello {3}world");
----
== Exceptions
In https://www.regular-expressions.info/freespacing.html[free-spacing mode] (``++Pattern.COMMENTS++`` flag, or with embedded flag expression ``++(?x)++``), whitespaces are ignored. In this case no issue should be triggered, because the whitespaces may be intended to improve readability.
include::../implementation.adoc[]