mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #3087 from nextcloud/useAssembleOnFindbugs
Fix findbugs
This commit is contained in:
commit
0ee0c655cf
2 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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" ")
|
||||
|
|
Loading…
Reference in a new issue