Skip to content

Keep skipLinesMatching lines when setting license years from git - #3201

Open
dualfroz wants to merge 1 commit into
diffplug:mainfrom
dualfroz:fix/2270-license-year-git-skip-lines
Open

dualfroz wants to merge 1 commit into
diffplug:mainfrom
dualfroz:fix/2270-license-year-git-skip-lines

Conversation

@dualfroz

Copy link
Copy Markdown
Contributor

with setLicenseHeaderYearsFromGitHistory the step skipped the skipLinesMatching handling that format() does, so everything before the delimiter got replaced and the shebang in the issue went with it. from what i can tell thats the whole bug, so both paths now go through the same skip-lines helper. this closes #2270 for the maven setup in the issue too, added a test for it plus changelog entries.

`setLicenseHeaderYearsFromGitHistory` built the new header from the
whole file and cut everything before the delimiter, so lines matched by
`skipLinesMatching` (like a shebang) were dropped. Run it through the
same skip-lines handling that the regular formatting path uses.

This branch has not been deployed

No deployments
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.

Shebang Removal While Adding Copyright Header in Shell Scripts

1 participant