rspec/rules/S6035/java/rule.adoc
2022-02-04 16:28:24 +00:00

31 lines
451 B
Plaintext

include::../description_with_reference_to_s5998.adoc[]
== Noncompliant Code Example
[source,java]
----
Pattern.compile("a|b|c"); // Noncompliant
----
== Compliant Solution
[source,java]
----
Pattern.compile("[abc]");
// or
Pattern.compile("[a-c]");
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
endif::env-github,rspecator-view[]