From ffb5771c072327f86bfc5752344c815a2a2fedc9 Mon Sep 17 00:00:00 2001 From: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com> Date: Mon, 12 Feb 2024 17:58:19 +0100 Subject: [PATCH] Modify rule S2004: Increase default threshold to four nested functions (#3643) --- rules/S2004/javascript/rule.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rules/S2004/javascript/rule.adoc b/rules/S2004/javascript/rule.adoc index 354ec514785..6109b261d1e 100644 --- a/rules/S2004/javascript/rule.adoc +++ b/rules/S2004/javascript/rule.adoc @@ -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 + } } } }