rspec/rules/S5855/java/rule.adoc

39 lines
563 B
Plaintext
Raw Normal View History

== Why is this an issue?
include::../description.adoc[]
2021-04-28 16:49:39 +02:00
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
"[ab]|a" // The "|a" is redundant because "[ab]" already matches "a"
".*|a" // .* matches everything, so any other alternative is redundant
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
"[ab]"
".*"
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Remove or rework this redundant alternative
=== Highlighting
The redundant alternative
endif::env-github,rspecator-view[]