New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Kotlin multiplatform test folders to default exclude configuration #2608
Comments
Maybe |
Any way, I think thatsomthing like #2581 would be really handy for your use case too. |
I think adding |
@schalkms I tried making a PR before but couldn't find the sources to modify. :) I presumed that default file was generated? |
One needs to edit 1 file and 1 unit test. The .yml file is auto-generated. I modified the 2 files quickly and submitted the PR. |
The default-detekt-config.yml has several default 'excludes' configurations to exclude test sources.
excludes: '**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt'
However, this does not cover test folders in Kotlin multiplatform projects, which are named
**/<platform-target>Test/**
, e.g.,**/jsTest/**
and**/commonTest/**
. I reuse the majority of defaults, but using detekt in a multiplatform project requires me to override all default excludes with my own:excludes: '**/commonTest/**,**/jvmTest/**,**/jsTest/**,**/test/**'
Therefore, it would be nice to either add the default multiplatform test folders to
default-detekt-config.yml
, or alternatively, to override the 'default' excludes in one place.The text was updated successfully, but these errors were encountered: