mathieucarbou / license-maven-plugin

Manage license headers in your source files

Home Page:https://oss.carbou.me/license-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Print a diff or explanation showing license rule or resolved expected license vs acutal upon failure

astubbs opened this issue · comments

ATM the plug-in only says the header is missing in certain files. It would be great to instead show actual vs expected.

Example, say there's a single letter or number wrong. Useful for debugging issues. We've had a confusing issue with the latest year tick over where the year is expected to be changed, but when it is, it still fails. Could be a confusing issue with git file modification dates vs actual date etc.

Some more explanation of failure would be great. Although this may be difficult with the format of the templates etc.

commented

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.

I think this is a good feature request. The spotless maven plugin does this. Currently when troubleshooting license rewrite failures I have no option other than to run license:format and use my IDE or other tools to examine the diff.

@astubbs @dbwiddis : agree this would be a nice addition and not so hard to do I think.

Though, I wouldn't add that by default because it can be very verbose on a big project.

I would add a new option like verboseCheck or showCheckErrors, something like this, which, when activated, would display the formatted file header like if a format would have been called.

Note also that with the recently introduced license sets, where several license files can now be used for a different set of source files, this is even more appropriate.