Rule Help: Check for SVN header

When creating a new program, we need to ensure the SVN header was added before checking the code in. What rule could I look at or copy with slight modifications for this? I noticed a couple of different approaches and I want the one that' most efficient.

Basically, I'm thinking all I need to do is see if SVN is somewhere in a comment at the top of the program.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jurjen's picture

re: Rule Help: Check for SVN header

Prolint might be able to see if there is an SVN header in de sourcefile, but Prolint can not prevent that someone checks a file in (into subversion I guess) without such an SVN header. Ony Subversion can prevent that :-)

Subversion has a bunch of hooks, in this case you could try a pre-commit hook to validate if the sourcefile contains the required header. A hook is a script in the repository directory on the subversion server.


No, that's fine. I just want

No, that's fine. I just want it flagged by prolint so the user can resolve the issue before attempting to check in. I'm just looking for a good rule that might be a good example to copy and modify.