Merge pull request #3087 from nextcloud/useAssembleOnFindbugs

Fix findbugs
This commit is contained in:
Andy Scherzinger 2018-09-25 13:25:33 +02:00 committed by GitHub
commit 0ee0c655cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -183,7 +183,7 @@ android {
ignoreFailures = false
effort = "max"
reportLevel = "medium"
classes = fileTree("$project.buildDir/intermediates/classes/gplay/debug/com/owncloud")
classes = fileTree("$project.buildDir/intermediates/javac/gplayDebug/compileGplayDebugJavaWithJavac/classes/")
excludeFilter = file("${project.rootDir}/findbugs-filter.xml")
source = fileTree('src/main/java')
pluginClasspath = project.configurations.findbugsPlugins

View file

@ -11,13 +11,13 @@
ruby scripts/analysis/lint-up.rb $1 $2 $3
lintValue=$?
./gradlew findbugs
# exit codes:
# 0: count was reduced
# 1: count was increased
# 2: count stayed the same
./gradlew findbugs
echo "Branch: $3"
if [ $3 = "master" ]; then
@ -58,6 +58,17 @@ else
checkLibrary=0
fi
# lint and findbugs file must exist
if [ ! -s build/reports/lint/lint.html ] ; then
echo "lint.html file is missing!"
exit 1
fi
if [ ! -s build/reports/findbugs/findbugs.html ] ; then
echo "findbugs.html file is missing!"
exit 1
fi
# add comment with results
lintResultNew=$(grep "Lint Report.* [0-9]* warnings" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")