mathieucarbou / license-maven-plugin

Manage license headers in your source files
https://oss.carbou.me/license-maven-plugin/
Apache License 2.0
242 stars 86 forks source link

Support one line headers #434

Open Rots opened 1 year ago

Rots commented 1 year ago

Describe the feature

I'd like to add one liners, but the current custom configuration won't allow that complaining that firstLine and lastLine cannot be empty e.g.

<!-- Copyright XYZ 2022 -->               # in .html
// Copyright XYZ 2022                     # in .ts

Any alternative you've considered ? a) live with multi line b) not using this tool

Rots commented 1 year ago

I found

https://github.com/mathieucarbou/license-maven-plugin/blob/license-maven-plugin-4.2.rc3/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java#L43

and

https://github.com/mathieucarbou/license-maven-plugin/blob/license-maven-plugin-4.2.rc3/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java#L59

the first still adds blank lines before and after the comment, in some cases the first tag gets lost :/ the second mostly works, but other comments at the beginning of the file are also removed :( I would also need the single line alternatives to all other cases like /** this */

stale[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Rots commented 1 year ago

Yes, still relevant, but no progress has been made

mathieucarbou commented 1 year ago

@Rots : did you try to make your own header template definition ?

Rots commented 1 year ago

Yes, but like I mentioned:

I'd like to add one liners, but the current custom configuration won't allow that complaining that firstLine and lastLine cannot be empty