rspec/rules/S1445/flex/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

49 lines
898 B
Plaintext

== Why is this an issue?
Even though this is syntactically correct, the ``++void++`` return type should not be used in the signature of a constructor. Indeed some developers might be confused by this syntax, believing that the constructor is in fact a standard function.
=== Noncompliant code example
[source,flex]
----
public class Foo
{
public function Foo() : void
{...}
}
----
=== Compliant solution
[source,flex]
----
public class Foo
{
public function Foo()
{...}
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Remove the "void" return type from this "XXXX" constructor
'''
== Comments And Links
(visible only on this page)
=== on 31 Oct 2013, 15:29:43 Freddy Mallet wrote:
Is implemented by \http://jira.codehaus.org/browse/SONARPLUGINS-3224
endif::env-github,rspecator-view[]