Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ detekt {

dependencies {
detektPlugins(libs.detekt.formatting)
detektPlugins(libs.popcornguineapig.detekt.rule)
}
}
5 changes: 4 additions & 1 deletion config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -940,4 +940,7 @@ formatting:
TrailingCommaOnCallSite:
active: false
TrailingCommaOnDeclarationSite:
active: false
active: false

popcorn_guineapig_rules:
config: "config/detekt/popcorngp-config.json"
22 changes: 22 additions & 0 deletions config/detekt/popcorngp-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"packagePrefix": "com.codandotv.streamplayerapp",
"rules": [
{
"filePattern": "^.*/data/.+\\.kt$",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nenhuma classe de data pode depender de domain e presentation

"forbiddenDependencies": [
"^.*/domain/.+\\.kt$",
"^.*/presentation/.+\\.kt$"
]
},
{
"filePattern": "^.*/domain/.+\\.kt$",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nenhuma classe de domain pode depender de presentation

"forbiddenDependencies": [
"^.*/presentation/.+\\.kt$"
]
},
{
"filePattern": "^.*/.+Handler\\.kt$",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classes que possuem a palavra handler não devem ter dependências internas

"dependenciesAllowed": false
}
]
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cameraCore = "1.4.2"
moko-permissions = "0.19.1"

#Test
popcornguineapigDetektRule = "1.0.0"
test_junit = "4.13.2"
androidx_core_testing = "2.2.0"
mockk = "1.13.7"
Expand Down Expand Up @@ -62,6 +63,7 @@ kotlin_gradle_plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-p
android_gradle_plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "android_gradle_plugin" }
detekt-gradle-plugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
popcornguineapig-detekt-rule = { module = "io.github.codandotv:popcornguineapig-detekt-rule", version.ref = "popcornguineapigDetektRule" }
serialization = { module = "org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin", version.ref = "kotlin" }

com-google-devtools-ksp-gradle-plugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }
Expand Down
Loading