[android] - add ktlint, optimise code for ktlint validation

This commit is contained in:
tobrun
2019-07-03 20:14:26 +02:00
committed by Tobrun
parent 16f1854a9c
commit dd16eadc38
51 changed files with 564 additions and 274 deletions

View File

@@ -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. " +