Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Latest commit

 

History

History
18 lines (14 loc) · 956 Bytes

lint_support.md

File metadata and controls

18 lines (14 loc) · 956 Bytes

Lint 支持

你可以为特定 variant 运行 lint,例如 ./gradlew lintRelease,或为所有 variants 运行(./gradlew lint),这种情况下会生成一份包含特定版本存在的问题的详细报告。你可以像下面的代码片段那样通过配置 lintOptions 节点来配置 lint。一般只能配置小部分选项,查看 DSL reference 了解所有可修改的选项。

android {
    lintOptions {
        // turn off checking the given issue id's
        disable 'TypographyFractions','TypographyQuotes'

        // turn on the given issue id's
        enable 'RtlHardcoded','RtlCompat', 'RtlEnabled'

        // check *only* the given issue id's
        check 'NewApi', 'InlinedApi'
    }
}