rspec/rules/S4011/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

60 lines
1011 B
Plaintext

== Why is this an issue?
This rule allows banning usage of certain constructors.
=== Noncompliant code example
Given parameters:
* className: java.util.Date
* argumentTypes: java.lang.String
[source,java]
----
Date birthday;
birthday = new Date("Sat Sep 27 05:42:21 EDT 1986"); // Noncompliant
birthday = new Date(528176541000L); // Compliant
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Remove this forbidden initialization
=== Parameters
.className
****
Name of the class whose constructor is forbidden. This parameter is mandatory, if absent the rule is disabled.
****
.argumentTypes
****
Comma-delimited list of argument types, E.G. java.lang.String, int[], int
****
.allOverloads
****
Boolean. Set to true to flag all overloads regardless of parameter type (default: false)
****
'''
== Comments And Links
(visible only on this page)
=== deprecates: S1212
=== relates to: S2253
endif::env-github,rspecator-view[]