[p4] Is there a way to fail submit if specific code was found on it?

MaxBk perforce-user-forum at forums.perforce.com
Thu Mar 9 05:50:01 PST 2017


Posted on behalf of forum user 'MaxBk'.

Hi,
So recently some team leaders asked if it's possible to force fail a submit
if some code pattern was found on the "submitting files".
For example.
John doe wants to submit Test.cs
Test.cs Has many functions and one of the functions uses the next code:
public string badUsage(){ var a = 0; var b ="Password"; return
otherFunction(a,B); }   
And I want to fail submit if I see the next pattern:
var b ="Password"; return otherFunction(  
I was thinking about making a tiger for submission the code for specific regex
but I think that there might be a better way/tool/plugin that could do that.

What do you guys think?
What's the best way to implement this?

Thanks in advance,
Max.



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5224-is-there-a-way-to-fail-submit-if-specific-code-was-found-on-it


More information about the perforce-user mailing list