Skip to content

Commit

Permalink
even more rules
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianmakila committed Sep 30, 2024
1 parent 76000b2 commit ad55c74
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public DependencyManager dependencyManager() {
}

public CommandManager<Audience> commandManager() {
return commandManager;
return this.commandManager;
}

public ListenerManager listenerManager() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected EventBuilder audience(Audience audience) {

protected EventBuilder cancelled(boolean cancelled) {
String cancelledString = cancelled ? this.placeholderConfig.cancelled() : "";
this.resolverBuilder = resolverBuilder.resolver(Placeholder.unparsed("cancelled", cancelledString));
this.resolverBuilder = this.resolverBuilder.resolver(Placeholder.unparsed("cancelled", cancelledString));
return this;
}

Expand Down
50 changes: 45 additions & 5 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,56 @@
<module name="ExplicitInitialization"/>
<module name="FallThrough"/>
<module name="IllegalCatch"/>

<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
<module name="IllegalThrows"/>
<module name="IllegalToken"/>
<module name="IllegalType"/>
<module name="InnerAssignment"/>
<module name="MissingNullCaseInSwitch"/>
<module name="ModifiedControlVariable"/>
<module name="MultipleStringLiterals">
<property name="allowedDuplicates" value="3" />
</module>
<module name="MultipleVariableDeclarations"/>
<module name="NoArrayTrailingComma"/>
<module name="NoEnumTrailingComma"/>
<module name="NoFinalizer"/>
<module name="OneStatementPerLine"/>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="PackageDeclaration"/>
<module name="RequireThis" />
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryParentheses"/>
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
<module name="UnnecessarySemicolonInEnumeration"/>
<!-- Java 21+ -->
<module name="UnnecessarySemicolonInTryWithResources"/>
<module name="UnusedCatchParameterShouldBeUnnamed"/>
<module name="UnusedLocalVariable"/>
<module name="WhenShouldBeUsed"/>

<!-- Imports -->
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>

<!-- Misc -->
<module name="CommentsIndentation"/>

<!-- Modifiers -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>

<!-- RegExp -->
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
</module>
</module>

<!-- Misc -->
<module name="NewlineAtEndOfFile"/>
</module>

0 comments on commit ad55c74

Please sign in to comment.