2019-12-31 16:46:22 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
package org.mozilla.fenix.detektrules
|
|
|
|
|
|
|
|
import io.gitlab.arturbosch.detekt.api.Config
|
|
|
|
import io.gitlab.arturbosch.detekt.api.RuleSet
|
|
|
|
import io.gitlab.arturbosch.detekt.api.RuleSetProvider
|
2020-11-11 23:24:42 +00:00
|
|
|
import org.mozilla.fenix.detektrules.perf.MozillaBannedPropertyAccess
|
|
|
|
import org.mozilla.fenix.detektrules.perf.MozillaRunBlockingCheck
|
2022-11-03 02:37:21 +00:00
|
|
|
import org.mozilla.fenix.detektrules.perf.MozillaStrictModeSuppression
|
2020-10-30 23:13:18 +00:00
|
|
|
import org.mozilla.fenix.detektrules.perf.MozillaUseLazyMonitored
|
2019-12-31 16:46:22 +00:00
|
|
|
|
2020-01-22 19:15:30 +00:00
|
|
|
class CustomRulesetProvider : RuleSetProvider {
|
2019-12-31 16:46:22 +00:00
|
|
|
override val ruleSetId: String = "mozilla-detekt-rules"
|
|
|
|
|
|
|
|
override fun instance(config: Config): RuleSet = RuleSet(
|
|
|
|
ruleSetId,
|
|
|
|
listOf(
|
2020-10-01 21:40:50 +00:00
|
|
|
MozillaBannedPropertyAccess(config),
|
2020-09-21 21:41:37 +00:00
|
|
|
MozillaStrictModeSuppression(config),
|
2020-11-02 17:49:17 +00:00
|
|
|
MozillaCorrectUnitTestRunner(config),
|
2020-10-30 23:13:18 +00:00
|
|
|
MozillaRunBlockingCheck(config),
|
2021-04-14 00:48:45 +00:00
|
|
|
MozillaUseLazyMonitored(config),
|
2022-11-03 02:37:21 +00:00
|
|
|
),
|
2019-12-31 16:46:22 +00:00
|
|
|
)
|
|
|
|
}
|