|
Hi, I've used spotless sofar to generate a license headers. However, it always replaces the list of contributors with the preset from the template. Is there a way to tell spotless that parts of the license header template should be ignored? Current license header template: Sample license header: |
Answered by
nedtwigg
Jul 21, 2025
Replies: 1 comment 1 reply
|
You can do something like: spotless {
toggleOffOn(' * Contributors:\n', ' */\n')
// this might work better, it's more specific
toggleOffOn(' * Contributors:\n', ' */\n\n// SPDX-License-Identifier: Apache-2.0')
}This is the code in the Gradle plugin, maven has equivalents Only trouble is that you can't do |
1 reply
Answer selected by
fwendland
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do something like:
This is the code in the Gradle plugin, maven has equivalents
spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java
Lines 1062 to 1069 in 4183935