Sonarqube version: * Enterprise Edition * Version 8.9.2 (build 46101)
The java:S120 triggers when the java package name has underscores.
This matches the provided regular expression,
^[a-z_]+(\.[a-z_][a-z0-9_]*)*$, but still triggers the rule. The rule should pass and should have an example with underscores in it.
Java package naming convention for reference: Naming a Package (The Java™ Tutorials > Learning the Java Language > Packages)