• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pmd / pmd / 4380

30 Jan 2025 09:37AM UTC coverage: 77.689% (+0.005%) from 77.684%
4380

push

github

adangel
[java] Fix tests

17353 of 23278 branches covered (74.55%)

Branch coverage included in aggregate %.

38134 of 48144 relevant lines covered (79.21%)

0.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/pmd-cli/src/main/java/net/sourceforge/pmd/cli/PmdCli.java
1
/**
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5
package net.sourceforge.pmd.cli;
6

7
import net.sourceforge.pmd.cli.commands.internal.PmdRootCommand;
8

9
import picocli.CommandLine;
10

11
public final class PmdCli {
12

13
    private PmdCli() { }
14

15
    // package private for test only without calling System.exit
16
    static int mainWithoutExit(String[] args) {
17
        // See https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md#-picocli-470
18
        // and https://picocli.info/#_closures_in_annotations
19
        // we don't use this feature. Disabling it avoids leaving the groovy jar open
20
        // caused by Class.forName("groovy.lang.Closure")
21
        System.setProperty("picocli.disable.closures", "true");
1✔
22
        final CommandLine cli = new CommandLine(new PmdRootCommand())
1✔
23
                .setCaseInsensitiveEnumValuesAllowed(true);
1✔
24

25
        return cli.execute(args);
1✔
26
    }
27

28
    public static void main(String[] args) {
29
        System.exit(mainWithoutExit(args));
×
30
    }
×
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc