Skip to content

Commit

Permalink
Modify rule S2004: Increase default threshold to four nested functions (
Browse files Browse the repository at this point in the history
  • Loading branch information
yassin-kammoun-sonarsource authored Feb 12, 2024
1 parent 9fbbc88 commit ffb5771
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rules/S2004/javascript/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ This can make it difficult for other developers or even yourself to understand a

=== Noncompliant code example

With the default threshold of 3 levels:
With the default threshold of 4 levels:

[source,javascript]
----
function f() {
function f_inner() {
function f_inner_inner() {
function f_inner_inner_inner() { // Noncompliant
function f_inner_inner_inner() {
function f_inner_inner_inner_inner() { // Noncompliant
}
}
}
}
Expand Down

0 comments on commit ffb5771

Please sign in to comment.