Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add lint restriction for Binder #65

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Mikhail57
Copy link

Add android lint rules to restrict usage of Binder's bind method outside of onCreate

@Mikhail57 Mikhail57 changed the title #52: Add lint restriction for Binder WIP: Add lint restriction for Binder Feb 14, 2021
@@ -0,0 +1,27 @@
plugins {
id("java-library")
id("kotlin")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавь сюда еще ktlint плагин

import com.intellij.psi.PsiMethod
import org.jetbrains.uast.UCallExpression

class WrongGenimiUsageDetector : Detector(), SourceCodeScanner {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот тут есть подозрение, что используется старое API посмотри как сделано на нашем рабочем проекте (название не называю из-за NDA)

import com.android.tools.lint.checks.infrastructure.LintDetectorTest

@Suppress("UnstableApiUsage")
class WrongGenimiUsageDetectorTest : LintDetectorTest() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут у тестов тоже старое апи, желательно поднять версию, так как может тупить

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants