@@ -78,13 +78,18 @@ public final class LintMojo extends SafeMojo {
7878 * @checkstyle MemberNameCheck (11 lines)
7979 */
8080 @ SuppressWarnings ("PMD.ImmutableField" )
81- @ Parameter (
82- property = "eo.failOnWarning" ,
83- required = true ,
84- defaultValue = "true"
85- )
81+ @ Parameter (property = "eo.failOnWarning" , required = true , defaultValue = "true" )
8682 private boolean failOnWarning ;
8783
84+ /**
85+ * Whether we should lint all the sources together as package.
86+ *
87+ * @checkstyle MemberNameCheck (11 lines)
88+ */
89+ @ SuppressWarnings ("PMD.ImmutableField" )
90+ @ Parameter (property = "eo.lintAsPackage" , required = true , defaultValue = "true" )
91+ private boolean lintAsPackage ;
92+
8893 @ Override
8994 void exec () throws IOException {
9095 final long start = System .currentTimeMillis ();
@@ -100,11 +105,18 @@ void exec() throws IOException {
100105 if (tojos .isEmpty ()) {
101106 Logger .info (this , "There are no XMIR programs, nothing to lint individually" );
102107 }
103- Logger .info (
104- this ,
105- "Also, %d XMIR programs linted as a package" ,
106- this .lintAll (counts )
107- );
108+ if (this .lintAsPackage ) {
109+ Logger .info (
110+ this ,
111+ "XMIR programs linted as a package: %d" ,
112+ this .lintAll (counts )
113+ );
114+ } else {
115+ Logger .info (
116+ this ,
117+ "Skipping linting as package (use -Deo.lintAsPackage=true to enable)"
118+ );
119+ }
108120 final String sum = LintMojo .summary (counts );
109121 Logger .info (
110122 this ,
0 commit comments