license-maven-plugin icon indicating copy to clipboard operation
license-maven-plugin copied to clipboard

Add regex for line comparison

Open cns-solutions-admin opened this issue 2 years ago • 3 comments

This solves #242 by adding a new optional regex to compare the lines other than the first for multiline headers.

cns-solutions-admin avatar Nov 19 '21 14:11 cns-solutions-admin

Also converts a inline header style's name to lower case, otherwise the comparison (and the example in the docs) fails.

cns-solutions-admin avatar Nov 19 '21 14:11 cns-solutions-admin

Hello, Why changing the header definition didn't work for your use case ?

mathieucarbou avatar Nov 26 '21 12:11 mathieucarbou

Changing the header definition did not work, because the detection of header lines was orginally done by comparing lines with startsWith(beforeEachLine.rtrim()) the old " * something" does not start with "**".

By introducing a (optional) RegEx for the header lines, this and most other use cases can be covered. It also fits with the current configuration, where we already have RegExs for start and end line.

cns-solutions-admin avatar Nov 26 '21 12:11 cns-solutions-admin