- Jan 19, 2012
-
-
Andreas Dilger authored
Allow blank lines after the signoff section, since there will usually be a blank line between the signoff and the checkpatch.pl output. Improve the EMAILPAT regex to detect bad email addresses that do not have a full name (at least 2 parts) and a full domain (also with at least 2 parts). Allow a generic "{Organization}-bug-id:" line in the signoff section to allow linking the patch commit into arbitrary bug databases for ease of tracking patches. Add test cases for all of these changes. Signed-off-by:
Andreas Dilger <adilger@whamcloud.com> Change-Id: Iaf14f6c985d3dd4837064d29071bd9acd8031d67 Reviewed-on: http://review.whamcloud.com/1867 Reviewed-by:
<bruce.korb@gmail.com> Tested-by: Hudson Tested-by:
Maloo <whamcloud.maloo@gmail.com> Reviewed-by:
Bobi Jam <bobijam@whamcloud.com> Reviewed-by:
Oleg Drokin <green@whamcloud.com>
-
- Dec 12, 2011
-
-
Bruce Korb authored
1. do global initializations in function. collect the read only and state monitoring initializations to one place where they can be easily identified. 2. Move the signoff and changeid code to functions. Have them call a "ck_wrapup" function to validate the processing state for doing the summary/changeid/etc. change-id: may now appear before signed-off-by: 3. Move the wrap up validations to the first-time-through-wrapup code in ck_wrapup. 4. add a function for handling innocuous tag lines. Only call "ck_wrapup". 5. Remove all $LINE echoing to the end of the case statement. Use "break" and/or "continue" to bypass line echo. 6. use [ ${#foo} -gt 0 ] in preference to [ $foo ]. This scriptlett will echo "no": $ f='! -z' ; [ $f ] && echo yes || echo no You could quote "$f", but directly checking length more correctly represents the intent. 7. Removed conditions for setting HAS_LAST_BLANK=true because the conditions were written to be *ALWAYS* true. foo=false [ $foo ] && echo hi there will always echo out, "hi there". 8. eliminate the convoluted and slightly wrong state management for trying to identify a "diff" block. Instead, just read in the next line in that case clause and either break out of the read loop or echo out both of the lines. 9. Do not fork and exec a bunch of programs when ${#LINE} will directly tell you how many characters are in the line. 10. do default line processing in a function, too. Makes regex code selection much easier to understand. Also allowed me to remove the ";&" case statement fall-through construct. Removed $HAS_SIGNOFF check since $IS_WRAPPING_UP is tested upon function entry. 11. emacs editor hints. 12. TODO: read the first two lines outside of the loop and verify that they are up to snuff. Then remove a bunch of checks scattered about the code. Line counting, etc., etc. Signed-off-by:
Bruce Korb <bruce_korb@xyratex.com> Change-Id: I30a4a9b77b82af9f9b965823487001cbd5c28230 Reviewed-on: http://review.whamcloud.com/1764 Tested-by: Hudson Tested-by:
Maloo <whamcloud.maloo@gmail.com> Reviewed-by:
Andreas Dilger <adilger@whamcloud.com>
-