
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.
55 lines
761 B
Plaintext
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[]
|