Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Copyright-consistency management tool question
Copyright-consistency management tool question [message #1814800] Wed, 18 September 2019 14:34 Go to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 160
Registered: July 2009
Senior Member
The Oomph project page mentions a tool for "Copyright-consistency management". I've installed all the Oomph tool features but I wasn't able to find any hint of this functionality.

Could you give me a hint, please, what this tool does and how to use it?
Re: Copyright-consistency management tool question [message #1814810 is a reply to message #1814800] Thu, 19 September 2019 04:09 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6483
Registered: July 2009
Senior Member
Hi Lutz,

This tool analyzes files in a Git repository for correct copyright headers. By default all ".java", ".ant", "build.xml", "plugin.xml", "fragment.xml", "feature.xml", "plugin.properties",
"fragment.properties", "feature.properties", "about.properties", "build.properties", "messages.properties", "copyright.txt", ".exsd",
"org.eclipse.jdt.ui.prefs" files are analyzed in all folders of the repository. For each such file the entire Git history is iterated and date ranges are constructed to format a proper Copyright line, for example:

Copyright (c) 2008-2013, 2015, 2016 Eike Stepper (Loehne, Germany) and others.


Files with missing Copyright headers can be opened in editors after the analysis, so that you can manually add the right form of headers easily. The analysis ignores Git commits with certain verb+noun combinations , so that the commits of the analysis results themselves have no impact on the copyright headers, for example "Fix copyright headers".

Many of the default values of the analysis can be overridden with a properties file named .legalchecks in the root of the Git repo.

Unfortunately there's no proper documentation available for the small tool, so it's best to study the code: https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.gitbash/src/org/eclipse/oomph/gitbash/repository/UpdateCopyrightsAction.java

Please note that, even though you can override the DEFAULT_COPYRIGHT_PATTERN with the "copyright.pattern" property, your custom pattern must specify the same match groups in the same order; compare https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.gitbash/src/org/eclipse/oomph/gitbash/repository/UpdateCopyrightsAction.java#n357 ff.

I wrote this small action to automate the copyright header management of CDO. If you want to make it more flexible feel free to contribute patches ;-)

Cheers
/Eike


Previous Topic:RAD crashes during Oomph initial setup configuration
Next Topic:Running Oomph setup from the command line
Goto Forum:
  


Current Time: Wed Feb 26 20:59:45 GMT 2020

Powered by FUDForum. Page generated in 0.01726 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top