Class MagicLiteralDuplicationOrError

java.lang.Object
org.ek9lang.compiler.phase5.MagicLiteralDuplicationOrError
All Implemented Interfaces:
BiConsumer<String, List<ParsedModule>>

class MagicLiteralDuplicationOrError extends Object implements BiConsumer<String, List<ParsedModule>>
Validates that a module does not contain repeated magic literals (E11065). A repeated magic literal is the same value (by text and type) appearing 3+ times in a single file, or 4+ times across files in the same module.

Sequential validation — runs after all files have been processed in parallel.

Based on SonarQube S1192 and PMD AvoidDuplicateLiterals thresholds. EK9 uses 3/file for local duplication and 4/module for cross-file duplication.