Skip to content
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

diktat-gradle-plugin shouldn't be using files for patterns #1026

Open
Tracked by #1806
petertrr opened this issue Aug 6, 2021 · 2 comments · May be fixed by #1797
Open
Tracked by #1806

diktat-gradle-plugin shouldn't be using files for patterns #1026

petertrr opened this issue Aug 6, 2021 · 2 comments · May be fixed by #1797
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed needed plugins Plugins for build systems to allow them to run diktat
Milestone

Comments

@petertrr
Copy link
Member

petertrr commented Aug 6, 2021

Either specify fileTree with wildcards and use files resolved by gradle
or use special gradle class PatternFilterable for this
or specify globs as string and feed them to ktlint
or detect kotlin plugin and use sources directly

@petertrr petertrr added enhancement New feature or request plugins Plugins for build systems to allow them to run diktat labels Aug 6, 2021
petertrr added a commit that referenced this issue Nov 17, 2021
#1118)

### What's done:
* Changed logic
* Changed examples
* Changed tests
* Added proper annotations for some properties inside gradle plugin (resulting in 'automatic' `NO_SOURCE` statuses wen provided patterns don't match anything)
* Fix deprecation warnings in `diktat-gradle-plugin/build.gradle.kts`

This PR proposes a more convenient API for configuring inputs for gradle task. See #1026 , #1094
@orchestr7 orchestr7 added help wanted Extra attention is needed good first issue Good for newcomers needed labels Apr 27, 2022
@petertrr
Copy link
Member Author

Seems to have been closed by #1118 mostly. However, diktat-gradle-plugin indeed might detect kotlin-gradle-plugin and get Kotlin sources from it.

@illarionov
Copy link

Is there some good reason for this?
Detekt Gradle Plugin allows you to specify a collection of files as a source (as it extends SourceTask)
Spotless Gradle Plugin also allows you to do this.

Different ways of specifying the list of templates for processed files in different plugins with their own rules of template processing in each make it more difficult to share configuration between them.

@nulls nulls added this to the 2.0.0 milestone Sep 15, 2023
nulls added a commit that referenced this issue Nov 14, 2023
### What's done:
- migrated to SourceTask
- removed inputs

It closes #1026
@nulls nulls modified the milestones: 2.0.0, 2.1.0 Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed needed plugins Plugins for build systems to allow them to run diktat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants