no-duplicate-code Disallow repeated nontrivial code regions Multiple nontrivial callables or statement sequences perform the same operations. Instead, you SHOULD extract the repeated statements into one callable. - Category: suspicious - Level: warning - Fix: none - Scope: program Reported function incrementLeft(value: int32): int32 { const next = value + 1; return next * 2; } function incrementRight(input: int32): int32 { const result = input + 1; return result * 2; } Accepted function increment(value: int32): int32 { const next = value + 1; return next * 2; } Prior art - eslint-plugin-sonarjs ยท no-identical-functions language/linter/src/rules/suspicious/noduplicatecode.rs:14