summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-07-03 20:14:26 +0200
committerTobrun <tobrun.van.nuland@gmail.com>2019-07-04 12:08:49 +0200
commitdd16eadc382fe853f4b877fbcfd909d103a339f5 (patch)
treeaa1ec40ae3fccc4745434a16a108d9814a8a51ec /platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt
parent16f1854a9ca98c00a5058c55e8a59df2c3463f4d (diff)
downloadqtlocation-mapboxgl-dd16eadc382fe853f4b877fbcfd909d103a339f5.tar.gz
[android] - add ktlint, optimise code for ktlint validation
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt')
-rw-r--r--platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt b/platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt
index 64838f91db..21093fc15b 100644
--- a/platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt
+++ b/platform/android/MapboxGLAndroidSDKLint/src/main/java/com/mapbox/mapboxsdk/lint/KeepDetector.kt
@@ -45,9 +45,9 @@ class KeepDetector : Detector(), SourceCodeScanner, FileScanner {
context.report(ISSUE_NOT_KEPT, node,
context.getNameLocation(node),
"This method contains native references and will be minified.")
- } else if (node.isConstructor
- && node.parameterList.parameters.find { it.type == PsiType.LONG && it.name!!.contains("native") } != null
- && checkKeepAnnotation(node)) {
+ } else if (node.isConstructor &&
+ node.parameterList.parameters.find { it.type == PsiType.LONG && it.name!!.contains("native") } != null &&
+ checkKeepAnnotation(node)) {
context.report(ISSUE_NOT_KEPT, node,
context.getNameLocation(node as UElement),
"This constructor might contain native references and will be minified. " +