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.