Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



2 answers

Permanent link

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

2 votes

Comments

Is it possible to have this text inserted after every 40 lines of code?

I tried the method above and it does not AUTOMATICALLY insert the text. How do I do this automatically, transparent to the user, every time code is delivered?


Permanent link
This worked excellent!! We used a simple check which now verifies that the Copyright has been changed to reflect the current year.

Thank you for your idea.

JimR

0 votes

Comments

James, were you able to do this in an automated fashion, transparent to the developer? If so, how did you implement it?

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,940

Question asked: Mar 29 '10, 2:30 p.m.

Question was seen: 7,170 times

Last updated: Jan 10 '14, 2:56 p.m.

Confirmation Cancel Confirm