-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add copyright header checks using maven checkstyle plugin #5649
Conversation
@mattdibi , I am happy for this update to go ahead. |
@srware Thanks for the quick feedback, this is greatly appreciated! 🙏 |
@mattdibi there's a side issue, since the checkstyle_checks.xml file refers to the https://github.com/eclipse-kura/kura/blob/ca95dd7a2e92ae50999c89bef3847193da2c83f0/header.txt file that is in the root directory, the execution in sub-modules and in the target platform results in an error (the plugin doesn't find the header file). The problem is very annoying because now it's impossible to build the target platform or a single bundle inside the related folder. |
@salvatore-coppola I'm going to revert the checkstyle change ASAP. The current approach is not working as intended, has low coverage and doesn't scale with all our projects. A better/different approach is required. |
This PR introduces the check for copyright headers consistency leveraging the maven checkstyle plugin.
Details: with this PR we're now leveraging the RegexpHeader check implemented by the maven checkstyle plugin. The checkstyle plugin now checks whether the header of the file matches the regex contained in the newly introduced
header.txt
file in the root directory.Please be aware that the check won't notify the developer of the need to update the copyright year when the file is edited. This type of check is not available in the checkstyle plugin (we would need to know which files with respect to the develop branch, probably a CI of sorts is better suited for the task).
While working on this check I found out a file that was not matching our current license. The file is the following:
kura/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/bluetooth/le/beacon/AdvertisingReportPhy.java
Line 5 in 5d52466
introduced in #3377 by @srware.
I took the chance to update the licence to EPL2.0 for consistency with the rest of the project. and in accordance to Eclipse Foundation guidelines (see: a29bec7)
Referring to the FAQ I would like to ask @srware whether they're OK with us updating the license of the above-mentioned file.