I’m using SQ 7.3. In general, I agree with the No Magic Numbers rule (S109), but I’m not convinced it’s helpful in Unit Tests where literals are likely more readable than constants. Is there a way to disable a rule like this for a given source path (e.g. rule is enabled for src/main/java and disabled for src/test/java)?
I know we could use //SONAR for each one, but that’s potentially a lot of work.
I use Maven 3 to execute the scanner. Is there a good way to have different rules for the testSource? I don’t want to skip SQ entirely for unit tests I don’t think.