rspec/rules/S3577/java/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

55 lines
761 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
With the default value: ``++^((Test|IT)[a-zA-Z0-9_]+|[A-Z][a-zA-Z0-9_]*(Test|Tests|TestCase|IT|ITCase))$++``
[source,java]
----
class Foo { // Noncompliant
@Test
void check() { }
}
class Bar { // Noncompliant
@Nested
class PositiveCase {
@Test
void check() { }
}
}
----
=== Compliant solution
[source,java]
----
class FooTest {
@Test
void check() { }
}
class BarIT {
@Nested
class PositiveCase {
@Test
void check() { }
}
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]