public interface HasBuiltinDelimiterForLicense
Every FormatExtension has a method
license(licenseContent, licenseDelimiter),
where licenseDelimiter is a regex that separates the license part of the code from the content.
For some kinds of format -
such as java, kotlin, and groovy -
we already have a defined delimiter, so users don’t have to provide it.
By having the java, kotlin, and groovy formats implement this interface,
you can write generic code for enforcing whitespace and licenses.
| Modifier and Type | Method and Description |
|---|---|
FormatExtension.LicenseHeaderConfig |
licenseHeader(String licenseHeader) |
FormatExtension.LicenseHeaderConfig |
licenseHeaderFile(Object licenseHeaderFile) |
FormatExtension.LicenseHeaderConfig licenseHeader(String licenseHeader)
licenseHeader - Content that should be at the top of every file.FormatExtension.LicenseHeaderConfig licenseHeaderFile(Object licenseHeaderFile)
licenseHeaderFile - Content that should be at the top of every file.