Skip to content

Commit 2ca3112

Browse files
authored
✨ Add fail on error in lint (#59)
* ✨ Add fail on error in lint * 📝 add reason for using SuppressLint
1 parent 976be2b commit 2ca3112

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

android/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ android {
2020
}
2121
lintOptions {
2222
warning 'InvalidPackage'
23+
abortOnError true
24+
// SuppressLint WrongConstant was used to suppress errors when using arrays of ints to represent annotations.
2325
}
2426
}
2527

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.instabug.reactlibrary;
22

3+
import android.annotation.SuppressLint;
34
import android.app.Application;
45
import android.net.Uri;
56
import android.os.Handler;
@@ -262,6 +263,7 @@ public void run() {
262263
* @param invocationMode the invocation mode
263264
* @param invocationOptions the array of invocation options
264265
*/
266+
@SuppressLint("WrongConstant")
265267
@ReactMethod
266268
public void invokeWithInvocationModeAndOptions(String invocationMode, ReadableArray invocationOptions) {
267269

@@ -1723,6 +1725,7 @@ public void show() {
17231725
Instabug.show();
17241726
}
17251727

1728+
@SuppressLint("WrongConstant")
17261729
@ReactMethod
17271730
public void setReportTypes(ReadableArray types) {
17281731
Object[] objectArray = ArrayUtil.toArray(types);
@@ -1982,6 +1985,7 @@ public void setShouldShowSurveysWelcomeScreen(boolean shouldShow) {
19821985
* @param isEmailRequired set true to make email field required
19831986
* @param actionTypes Bitwise-or of actions
19841987
*/
1988+
@SuppressLint("WrongConstant")
19851989
@ReactMethod
19861990
public void setEmailFieldRequiredForFeatureRequests(boolean isEmailRequired, ReadableArray actionTypes) {
19871991
try {

0 commit comments

Comments
 (0)