Skip to content

Introduce configFile property on DetektGenerateTask#5308

Merged
schalkms merged 1 commit intodetekt:mainfrom
3flex:generate-right-prop
Sep 17, 2022
Merged

Introduce configFile property on DetektGenerateTask#5308
schalkms merged 1 commit intodetekt:mainfrom
3flex:generate-right-prop

Conversation

@3flex
Copy link
Copy Markdown
Member

@3flex 3flex commented Sep 17, 2022

This corrects a few issues:

  1. The config file parameter should refer to a single file, but it's currently a ConfigurableFileCollection. Replacing with RegularFileProperty is more correct as the task only generates a single file, not a collection of files.
  2. The config parameter is incorrectly annotated with @InputFiles, but task generates a file and doesn't use the values as an input at all.
  3. The config parameter is annotated @Optional. This doesn't make sense - if the task is run, it should generate a file, and the config file parameter must have a value to achieve this.

This deprecation is backwards compatible. When the config parameter is removed from the task there will be a small code clean up required.

@schalkms schalkms added this to the 1.22.0 milestone Sep 17, 2022
@schalkms schalkms merged commit f5be0d8 into detekt:main Sep 17, 2022
@3flex 3flex deleted the generate-right-prop branch September 17, 2022 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants