slack lints
0.8.2
该存储库包含我们在Slack的Android和Kotlin代码库中使用的自定义Android/Kotlin棉绒检查的集合。
虽然我们确实将文物发布到Maven Central,但某些绒毛检查可能仅与Slack的代码库真正相关。我们开发与社区的知识共享开发。
将依赖项添加到lintChecks配置中。注意对于非Android项目,您必须应用com.android.lint gradle插件来使用此插件。
dependencies {
lintChecks( " com.slack.lint:slack-lint-checks:<version> " )
}slack.lint.mocking软件包包含多个检测器和实用程序,用于检测不应模拟的类型。这类似于eRRORPRONE的DoNotMockChecker ,并用作API的执行层和@DoNotMock注释的类。这也检测到不应嘲笑的常见类型,例如Kotlin data类或自动Vaily类。
为了编写更多的包容性代码,我们有一个InclusiveNamingChecker工具,可以检查可配置的非包含名称的列表。
MoshiUsageDetector在编写Moshi和Moshix的课程时,包含大量检查常见程序员错误的检查。
JavaOnlyDetector检测使用Kotlin的仅使用Java的API。基于Uber/Lint-Checks中的原始未发布的实现。DaggerKotlinIssuesDetector在Kotlin代码中使用匕首时检测到一些已知问题。RetrofitUsageDetector使用改造时检测到一些常见问题。DenyListedApi - 检测不应使用的API的使用。MustUseNamedParams - 可用于应始终使用命名参数的功能。对于具有很多参数和/或可能会更改其订单的API很有用,并且您想保持更改与源兼容。 Copyright 2021 Slack Technologies, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.