I'm getting this error when running the extension on bazel itself:
Folder '/home/yusuke.tsutsumi/workspace/bazel/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac' contains more Java files then configured in Bazel. This is a scenario which is challenging to support in IDEs! Consider re-structuring your source code into separate folder hierarchies and Bazel packages.
 - javac/JavacOptions.java
 - javac/WerrorCustomOption.java
I looked at the files, and those are used in a separate target, although indeed they are explicitly excluded from the javac target
Although I think the error is still correct in that the package structure is difficult for parse properly - it is still a technically correct usage of bazel.
At minimum maybe this should be a warning and not an error?