Skip to content

Reuse configs for GroovyExtension and GroovyGradleExtension#1892

Merged
nedtwigg merged 1 commit intodiffplug:mainfrom
Goooler:reuse-groovy-configs
Nov 20, 2023
Merged

Reuse configs for GroovyExtension and GroovyGradleExtension#1892
nedtwigg merged 1 commit intodiffplug:mainfrom
Goooler:reuse-groovy-configs

Conversation

@Goooler
Copy link
Copy Markdown
Member

@Goooler Goooler commented Nov 19, 2023

Refs #1890.

Comment on lines -38 to +29
public class GroovyExtension extends FormatExtension implements HasBuiltinDelimiterForLicense, JvmLang {
public class GroovyExtension extends BaseGroovyExtension implements HasBuiltinDelimiterForLicense, JvmLang {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should we implement HasBuiltinDelimiterForLicense for GroovyGradleExtension? If so we can move this into BaseGroovyExtension as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's pretty hard to find the regex for Groovy, I think it's really hard to find it for GroovyGradle, as anything could be at the top. IMO hiding this regex from the user is counterproductive because too likely that they will end up needing to change something about it.

@Goooler Goooler changed the title Reuse configs for GroovyExtension and GroovyGradleExtension Reuse configs for GroovyExtension and GroovyGradleExtension Nov 19, 2023
@nedtwigg nedtwigg merged commit 05a3e2e into diffplug:main Nov 20, 2023
@nedtwigg
Copy link
Copy Markdown
Member

Nice refactor!

@Goooler Goooler deleted the reuse-groovy-configs branch November 21, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants