Skip to content

Commit

Permalink
Upgrade Checkstyle to version 8.29
Browse files Browse the repository at this point in the history
  • Loading branch information
pmwmedia committed Feb 2, 2020
1 parent b494690 commit 7d1651c
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public Configuration() {
* Creates a new empty temporary file.
*
* @throws IOException
* Failed to create new temporary file.
* Failed to create new temporary file
*/
@Setup(Level.Invocation)
public void init() throws IOException {
Expand All @@ -305,6 +305,9 @@ public void init() throws IOException {

/**
* Verifies that all lines were written and deletes the temporary file afterwards.
*
* @throws IllegalStateException
* Log file is incomplete or corrupt
*/
@TearDown(Level.Invocation)
public void dispose() {
Expand Down
15 changes: 8 additions & 7 deletions configuration/checkstyle-checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<module name="Checker">

<property name="fileExtensions" value="java, properties, xml" />
<property name="tabWidth" value="4" />

<!-- Headers -->

Expand All @@ -25,15 +26,16 @@

<!-- Miscellaneous -->

<module name="LineLength">
<property name="max" value="140" />
</module>
<module name="NewlineAtEndOfFile" />
<module name="UniqueProperties">
<property name="fileExtensions" value="properties" />
</module>

<module name="TreeWalker">

<property name="tabWidth" value="4" />

<!-- Annotations -->

<module name="AnnotationLocation">
Expand Down Expand Up @@ -86,6 +88,7 @@
<module name="MissingCtor" />
<module name="MissingSwitchDefault" />
<module name="MultipleVariableDeclarations" />
<module name="NoArrayTrailingComma" />
<module name="NoClone" />
<module name="NoFinalizer" />
<module name="OneStatementPerLine" />
Expand All @@ -96,6 +99,7 @@
<module name="StringLiteralEquality" />
<module name="SuperClone" />
<module name="SuperFinalize" />
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
<module name="UnnecessaryParentheses" />

<!-- Imports -->
Expand All @@ -115,9 +119,9 @@
<!-- Javadoc Comments -->

<module name="AtclauseOrder" />
<module name="JavadocBlockTagLocation" />
<module name="JavadocContentLocationCheck" />
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true" />
<property name="allowThrowsTagsForSubclasses" value="true" />
<property name="validateThrows" value="true" />
</module>
<module name="JavadocParagraph" />
Expand Down Expand Up @@ -164,9 +168,6 @@
<!-- Size Violations -->

<module name=" AnonInnerLength " />
<module name="LineLength">
<property name="max" value="140" />
</module>
<module name="MethodLength">
<property name="max" value="200" />
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,9 @@ private static boolean isCoveredByMinimumLevel(final org.tinylog.Level level) {
* @param level
* Severity level from JBoss Logging
* @return Responding severity level of tinylog
*
* @throws IllegalArgumentException
* Unknown JBoss Logging severity level
*/
private static org.tinylog.Level translateLevel(final Level level) {
switch (level) {
Expand Down
3 changes: 3 additions & 0 deletions jul-tinylog/src/main/java/org/tinylog/jul/BridgeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ void activate() {
* @param level
* Severity level from tinylog
* @return Logging level for {@code java.util.logging}
*
* @throws IllegalArgumentException
* Unknown JUL severity level
*/
private static Level translateLevel(final org.tinylog.Level level) {
switch (level) {
Expand Down
3 changes: 3 additions & 0 deletions log4j1.2-api/src/main/java/org/apache/log4j/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,9 @@ private static org.tinylog.Level translatePriority(final Priority priority) {
* @param level
* Severity level of tinylog 2
* @return Corresponding level of Apache Log4j 1.2
*
* @throws IllegalArgumentException
* Unknown tinylog 2 severity level
*/
private static Level translateLevel(final org.tinylog.Level level) {
switch (level) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<android.version>1.5_r3</android.version>
<assertj-core.version>3.13.2</assertj-core.version>
<assertj-db.version>1.2.0</assertj-db.version>
<checkstyle.version>8.23</checkstyle.version>
<checkstyle.version>8.29</checkstyle.version>
<commons-lang.version>3.9</commons-lang.version>
<commons-logging.version>1.2</commons-logging.version>
<dokka.version>0.9.18</dokka.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public void evaluate() throws Throwable {
/**
* Starts collecting outputs form standard output stream {@link System#out} and error output stream
* {@link System#err} instead of writing them to console.
*
* @throws RuntimeException
* UTF-8 is not supported (wrapped {@link UnsupportedEncodingException})
*/
public void start() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ private static void fillStackTraceElements(final Thread thread, final StackTrace
* Source thread for stack trace
* @param elements
* Target array for storing stack trace
*
* @throws UnsupportedOperationException
* Always thrown on each call
*/
@SuppressWarnings("unused")
private static void throwException(final Thread thread, final StackTraceElement[] elements) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ public void createTimestampFormatter() {
* @param index
* Position of stack trace element
* @return Nothing, will always throw an exception
*
* @throws UnsupportedOperationException
* Always thrown on each call
*/
@SuppressWarnings("unused")
private static StackTraceElement getStackTraceElement(final int index) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public SizePolicy() {
/**
* @param argument
* Maximum size for log file (e.g. "16MB")
*
* @throws IllegalArgumentException
* Invalid or unsupported maximum size
*/
public SizePolicy(final String argument) {
if (argument == null || argument.isEmpty()) {
Expand Down
3 changes: 3 additions & 0 deletions tinylog1.3-api/src/main/java/org/pmw/tinylog/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,9 @@ private static boolean isCoveredByMinimumLevel(final org.tinylog.Level level) {
* @param level
* Severity level of tinylog 2
* @return Corresponding severity level of tinylog 1.3
*
* @throws IllegalArgumentException
* Unknown tinylog 2 severity level
*/
private static Level translateLevel(final org.tinylog.Level level) {
switch (level) {
Expand Down

0 comments on commit 7d1651c

Please sign in to comment.