Verify source code during check-in or delivery
We migrated from SVN to Jazz source control early in 2010.
We have a requirement that all source code submissions made in a calendar year have a copyright that reflects the year. This is a 2 part question.
1) What would be the recommended way of determining all of the source files that have changed for a stream in 2010 so that we can ensure that the copyright headers are correct?
2) We would like to automate the above going forward by running a check of the source during check-in or delivery (whichever is simpler!) and either automatically fix the copyright or reject the change with sufficient information that the submitter knows to fix the copyright. What would be a recommended way of doing this?
Thanks
Jim
We have a requirement that all source code submissions made in a calendar year have a copyright that reflects the year. This is a 2 part question.
1) What would be the recommended way of determining all of the source files that have changed for a stream in 2010 so that we can ensure that the copyright headers are correct?
2) We would like to automate the above going forward by running a check of the source during check-in or delivery (whichever is simpler!) and either automatically fix the copyright or reject the change with sufficient information that the submitter knows to fix the copyright. What would be a recommended way of doing this?
Thanks
Jim
2 answers
2) We would like to automate the above going forward by running a check of the source during check-in or delivery (whichever is simpler!) and either automatically fix the copyright or reject the change with sufficient information that the submitter knows to fix the copyright. What would be a recommended way of doing this?
You can add a precondition for delivery operation. Detailed steps:
1. open your team area
2. click on "process customization source" tab
3. find <operation id="com.ibm.team.scm.client.deliver">
4. insert following precondition and fill in the values similar to the sample values provided at below.
<operation id="com.ibm.team.scm.client.deliver">
<preconditions>
<precondition xmlns="http://com.ibm.team.process/requireContent" description="Remember to include the Copyright on all Java files that you create." id="com.ibm.team.process.deliver.requiredContent" name="XXX Copyright">
<filePattern pattern=".*java"/>
<requiredText text="Copyright XXX Corporation"/>
<insertText text="/*******************************************************************************
* Property of XXX * (c) Copyright XXXXX
*******************************************************************************/"/>
</precondition>
5. do more editing at "Process Customization" tab page