/errorprone-slf4j

An Error Prone plugin for SLF4J

Primary LanguageJavaApache License 2.0Apache-2.0

Find and fix misusage of SLF4J with Google Error Prone

This is a plugin for Google Error Prone, that detects misusage of SLF4J. This provides almost same feature with findbugs-slf4j.

Build Status Quality Gate Status Maven Central

Supported Bug Patterns

Current version supports following bug patterns:

Install

After installation of Error Prone, introduce errorprone-slf4j as plugin. Refer official document or following examples:

Maven

maven-compiler-plugin supports <annotationProcessorPaths> from version 3.5. Use it in configuration of maven-compiler-plugin like below:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <compilerId>javac-with-errorprone</compilerId>
    ...
    <annotationProcessorPaths>
      <path>
        <groupId>jp.skypencil.errorprone.slf4j</groupId>
        <artifactId>errorprone-slf4j</artifactId>
        <version>0.1.3</version>
      </path>
    </annotationProcessorPaths>
  </configuration>
</plugin>

Gradle

From v4.6, Gradle supports annotationProcessor configuration so you can configure your project like below:

dependencies {
  annotationProcessor 'jp.skypencil.errorprone.slf4j:errorprone-slf4j:0.1.2'
}

Copyright

Copyright 2012-2018 Kengo TODA

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.