Reports classes or files that contain multiple overloaded main methods in Groovy 5.

When a class or file has several main methods with different signatures, it can be unclear which one serves as the application's entry point because the invocation of the main method occurs at runtime based on the presence of arguments. Consider the following example:


class A {
    void main(String[] args) {
        println "1"
    }

    void main() {
        println "2"
    }
}
If no arguments are passed, then the main(), otherwise the main(String[]) will be invoked.