ソースを参照

add check for nonNull

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 4 年 前
コミット
3809f2ab7b
1 ファイル変更9 行追加1 行削除
  1. 9 1
      scripts/analysis/analysis-wrapper.sh

+ 9 - 1
scripts/analysis/analysis-wrapper.sh

@@ -127,7 +127,12 @@ else
         gplayLimitation="<h1>Following files are beyond 500 char limit:</h1><br><br>"$gplayLimitation
     fi
 
-    curl -u $1:$2 -X POST https://api.github.com/repos/nextcloud/android/issues/$7/comments -d "{ \"body\" : \"$codacyResult $lintResult $findbugsResultNew $findbugsResultOld $checkLibraryMessage $lintMessage $findbugsMessage $gplayLimitation \" }"
+    # check for NotNull
+    if [[ $(grep org.jetbrains.annotations * -ir | grep src/main -c) -gt 0 ]] ; then
+        notNull="org.jetbrains.annotations.NotNull is used. Please use androidx.annotation.NonNull instead.<br><br>"
+    fi
+
+    curl -u $1:$2 -X POST https://api.github.com/repos/nextcloud/android/issues/$7/comments -d "{ \"body\" : \"$codacyResult $lintResult $findbugsResultNew $findbugsResultOld $checkLibraryMessage $lintMessage $findbugsMessage $gplayLimitation $notNull\" }"
 
     if [ ! -z "$gplayLimitation" ]; then
         exit 1
@@ -141,6 +146,9 @@ else
         exit $lintValue
     fi
 
+    if [ $notNull -gt 0 ]; then
+        exit 1
+
     if [ $findbugsValue -eq 2 ]; then
         exit 0
     else