
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.
73 lines
1.1 KiB
Plaintext
73 lines
1.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Exceptions
|
|
|
|
This rule ignores Immediately Invoked Function Expressions (IIFE), which are functions that are created and invoked without ever being assigned a name.
|
|
|
|
[source,javascript]
|
|
----
|
|
(function () { // Ignored by this rule
|
|
|
|
function open() { // Classic function declaration; not ignored
|
|
// ...
|
|
}
|
|
|
|
function read() {
|
|
// ...
|
|
}
|
|
|
|
function readlines() {
|
|
// ...
|
|
}
|
|
})();
|
|
----
|
|
|
|
This rule also ignores React Functional Components, which are JavaScript functions named with a capital letter and returning a React element (JSX syntax).
|
|
|
|
|
|
[source,javascript]
|
|
----
|
|
function Welcome() {
|
|
const greeting = 'Hello, World!';
|
|
|
|
// ...
|
|
|
|
return (
|
|
<div className="Welcome">
|
|
<p>{greeting}</p>
|
|
</div>
|
|
);
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
=== Parameters
|
|
|
|
.max
|
|
****
|
|
_INTEGER_
|
|
|
|
----
|
|
200
|
|
----
|
|
|
|
Maximum authorized lines of code in a function
|
|
****
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|