-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13635 from woocommerce/13634-woo-pos-it-seems-tha…
…t-custom-detekt-rules-work-on-the-code-outside-of-woopos-package [Woo POS] Custom detekt rules work on the code outside of woopos package
- Loading branch information
Showing
8 changed files
with
24 additions
and
53 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...main/kotlin/com/woocommerce/android/ui/woopos/common/composeui/component/WooPosButtons.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...c/main/kotlin/com/woocommerce/android/ui/woopos/common/composeui/component/WooPosTexts.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...trules/src/main/kotlin/com/woocommerce/android/detektrules/woopos/WooPosBaseDetektRule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.woocommerce.android.detektrules.woopos | ||
|
||
import io.gitlab.arturbosch.detekt.api.Config | ||
import io.gitlab.arturbosch.detekt.api.Rule | ||
import org.jetbrains.kotlin.psi.KtFile | ||
|
||
abstract class WooPosBaseDetektRule(config: Config) : Rule(config) { | ||
private val targetPackagePrefix = "com.woocommerce.android.ui.woopos" | ||
|
||
override fun visitKtFile(file: KtFile) { | ||
if (file.packageFqName.asString().startsWith(targetPackagePrefix)) { | ||
super.visitKtFile(file) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters