Currently, pifr_coder.client.inc is hardcoded to run coder reviews at SEVERITY_MINOR; ie. the strictest setting.
The attached patch modifies this to check for an argument in $test->arguments['coder.severity'], and if the argument is set, uses that value instead of the SEVERITY_MINOR default.
If no ['coder.severity'] argument exists, then it continues to use SEVERITY_MINOR as the default coder severity level.
While this shouldn't change anything in the current testbot implementations, it opens up the door to supporting various custom coder combinations in the future. As an example, I've added a 'severity' field in the Coder parameters form on the 'manual coder' testbot interface I've been working on.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | pifr_coder_support_multiple_coder_severity_levels_v2-1205878-3.patch | 691 bytes | jthorson |
| #1 | pifr_coder_support_multiple_coder_severity_levels-1205878-2.patch | 669 bytes | jthorson |
Comments
Comment #1
jthorson commentedAdding patch
Comment #2
rfayWould (!empty($this->arguments['coder.severity'])) ? ...
would as well? That way we avoid the #fail and message if coder.severity is not set.
Powered by Dreditor.
Comment #3
jthorson commentedHmm ... I'm guessing the 'true' code must always be evaluated, even if the condition is false?
In any case, here's a different approach.
Comment #4
jthorson commentedComment #5
rfayCommitted: 076dcc1
Thanks!
Comment #6
jthorson commented