Skip to content

Commit

Permalink
Fix compile warnings, add checkstyle & pmd errors for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Byron Marohn <[email protected]>
  • Loading branch information
Combustible committed May 3, 2024
1 parent 934434b commit d4b3918
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ jobs:
set -o pipefail
./gradlew build --console=plain 2>&1 | tee compile.log
set +o pipefail
cat compile.log | reviewdog -efm="%W%f:%l: warning: %m" -efm="%+C%[ %\t]%.%#" -name="compiler-warnings" -level=error -fail-on-error -reporter=github-pr-check
cat compile.log | reviewdog -efm="%f:%l: warning:%m" -name="compiler-warnings" -level=error -fail-on-error -reporter=github-pr-check
cat build/reports/pmd/main.xml | reviewdog -efm='%+P<file name="%f">' -efm='%W<violation beginline="%l%.%#begincolumn="%c%.%#' -efm='%-C<%.%#' -efm='%+C%.%#' -efm='%-Q' -name="pmd" -level=error -fail-on-error -reporter=github-pr-check
cat build/reports/checkstyle/main.xml | reviewdog -f=checkstyle -name="checkstyle (adapterapi)" -level=error -fail-on-error -reporter=github-pr-check
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class SoulPartyEntry implements SoulGroup {
public SoulPartyEntry(List<SoulPartyHistoryEntry> history) throws Exception {
mHistory = history;

String refLabel = history.get(0).getLabel();
String refLabel = history.get(0 ).getLabel();

Check warning on line 25 in src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java

View workflow job for this annotation

GitHub Actions / checkstyle (adapterapi)

[checkstyle (adapterapi)] src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java#L25 <com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck>

')' is preceded with whitespace.
Raw output
/home/runner/work/library-of-souls/library-of-souls/src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java:25:41: warning: ')' is preceded with whitespace. (com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck)

for (SoulPartyHistoryEntry entry : history) {
if (!entry.getLabel().equals(refLabel)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ public SoulsDatabase(Plugin plugin, boolean loadHistory) throws Exception {
mIgnoreNextChange = false;
}
} catch (Exception e) {
mPlugin.getLogger().warning("Caught exception while polling database file: " + e.getMessage());
e.printStackTrace();
}
}, 200, 200);

Expand Down

0 comments on commit d4b3918

Please sign in to comment.