Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/spotbugs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Spotbugs
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B verify spotbugs:spotbugs -Dmaven.test.skip=true
- uses: jwgmeligmeyling/spotbugs-github-action@v1
with:
path: "**/spotbugsXml.xml"
7 changes: 7 additions & 0 deletions dev/spotbugs-include.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,12 @@
<Not>
<Package name="~org\.tikv\.common\.parser.*"/>
</Not>
<Not>
<Or>
<Bug pattern="EI_EXPOSE_REP"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Or>
</Not>
<Rank value="1"/>
</Match>
</FindBugsFilter>
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,11 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.5.2.0</version>
<configuration>
<includeFilterFile>dev/spotbugs-include.xml</includeFilterFile>
<xmlOutput>true</xmlOutput>
<failOnError>false</failOnError>
</configuration>
<dependencies>
<!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
<dependency>
Expand Down