[Linter] Upgrade Checkstyle plugin to 3.1.2 supporting Checkstyle version up to 8.41 (#1226)
* Upgrade checkstyle plugin to latest version 3.1.2 * Update rules to support Checkstyle 8.41 * Fix linter issue
This commit is contained in:
Родитель
7740765984
Коммит
104b7e820a
|
@ -85,6 +85,10 @@
|
|||
|
||||
<module name="SuppressWarningsFilter" />
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<!-- check for usage of literal equality "==" between string -->
|
||||
<module name="StringLiteralEquality"/>
|
||||
|
@ -125,10 +129,7 @@
|
|||
</module>
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
<!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
<!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
|
||||
|
|
|
@ -57,12 +57,12 @@ public class RegisterClassMiddleware<T> implements Middleware {
|
|||
this.service = withService;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Adds the associated object or service to the current turn context.
|
||||
* @param turnContext The context object for this turn.
|
||||
* @param next The delegate to call to continue the bot middleware pipeline.
|
||||
*/
|
||||
@Override
|
||||
public CompletableFuture<Void> onTurn(TurnContext turnContext, NextDelegate next) {
|
||||
if (!StringUtils.isBlank(key)) {
|
||||
turnContext.getTurnState().add(key, service);
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -18,7 +18,7 @@
|
|||
<jdk.version>1.8</jdk.version>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<checkstyle.version>3.1.0</checkstyle.version>
|
||||
<checkstyle.version>3.1.2</checkstyle.version>
|
||||
<pmd.version>3.14.0</pmd.version>
|
||||
<exclude.tests>%regex[.*recognizers.*]</exclude.tests>
|
||||
<!-- <repo.id>MyGet</repo.id> -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче