This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git
The following commit(s) were added to refs/heads/master by this push:
new 897593c Update checkstyle and enforce.
897593c is described below
commit 897593c0f09ba8b87b3dd13dce00b0d5fbdf2c3f
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Oct 22 10:29:27 2021 -0400
Update checkstyle and enforce.
---
src/conf/checkstyle.xml | 3 +--
src/main/java/org/apache/commons/cli/GnuParser.java | 3 +--
src/main/java/org/apache/commons/cli/HelpFormatter.java | 3 +--
src/main/java/org/apache/commons/cli/Parser.java | 3 +--
src/test/java/org/apache/commons/cli/HelpFormatterTest.java | 6 ++----
5 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml
index eb54177..0c7dcfb 100644
--- a/src/conf/checkstyle.xml
+++ b/src/conf/checkstyle.xml
@@ -46,13 +46,13 @@ limitations under the License.
</module>
<module name="TreeWalker">
+ <module name="LeftCurly" />
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocType"/>
<module name="JavadocVariable"/>
-
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
@@ -72,7 +72,6 @@ limitations under the License.
<module name="RedundantImport"/>
<module name="UnusedImports"/>
-
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!--<module name="FileLength"/>-->
diff --git a/src/main/java/org/apache/commons/cli/GnuParser.java
b/src/main/java/org/apache/commons/cli/GnuParser.java
index 4126352..8369c80 100644
--- a/src/main/java/org/apache/commons/cli/GnuParser.java
+++ b/src/main/java/org/apache/commons/cli/GnuParser.java
@@ -78,8 +78,7 @@ public class GnuParser extends Parser {
}
if (eatTheRest) {
- for (i++; i < arguments.length; i++) // NOPMD
- {
+ for (i++; i < arguments.length; i++) { // NOPMD
tokens.add(arguments[i]);
}
}
diff --git a/src/main/java/org/apache/commons/cli/HelpFormatter.java
b/src/main/java/org/apache/commons/cli/HelpFormatter.java
index 81cc03c..911e3f8 100644
--- a/src/main/java/org/apache/commons/cli/HelpFormatter.java
+++ b/src/main/java/org/apache/commons/cli/HelpFormatter.java
@@ -807,8 +807,7 @@ public class HelpFormatter {
}
renderWrappedText(sb, width, nextLineTabStop, line);
}
- } catch (final IOException e) // NOPMD
- {
+ } catch (final IOException e) { // NOPMD
// cannot happen
}
diff --git a/src/main/java/org/apache/commons/cli/Parser.java
b/src/main/java/org/apache/commons/cli/Parser.java
index a28d47a..8543d9c 100644
--- a/src/main/java/org/apache/commons/cli/Parser.java
+++ b/src/main/java/org/apache/commons/cli/Parser.java
@@ -310,8 +310,7 @@ public abstract class Parser implements CommandLineParser {
if (opt.getValues() == null || opt.getValues().length ==
0) {
try {
opt.addValueForProcessing(value);
- } catch (final RuntimeException exp) // NOPMD
- {
+ } catch (final RuntimeException exp) { // NOPMD
// if we cannot add the value don't worry about it
}
}
diff --git a/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
b/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
index 3042034..d836f99 100644
--- a/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
+++ b/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
@@ -294,8 +294,7 @@ public class HelpFormatterTest {
}
@Test
- public void testPrintHelpNewlineFooter()
- {
+ public void testPrintHelpNewlineFooter() {
final HelpFormatter formatter = new HelpFormatter();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final PrintWriter pw = new PrintWriter(out);
@@ -322,8 +321,7 @@ public class HelpFormatterTest {
}
@Test
- public void testPrintHelpNewlineHeader()
- {
+ public void testPrintHelpNewlineHeader() {
final HelpFormatter formatter = new HelpFormatter();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final PrintWriter pw = new PrintWriter(out);