contrib/check-code.py
changeset 27693 2b9126d6588b
parent 27640 8d0a09162d0f
child 27791 0029c2bebc23
equal deleted inserted replaced
27692:e0465035def9 27693:2b9126d6588b
   146 
   146 
   147 winglobmsg = "use (glob) to match Windows paths too"
   147 winglobmsg = "use (glob) to match Windows paths too"
   148 uprefix = r"^  \$ "
   148 uprefix = r"^  \$ "
   149 utestpats = [
   149 utestpats = [
   150   [
   150   [
   151     (r'^(\S.*||  [$>] .*)[ \t]\n', "trailing whitespace on non-output"),
   151     (r'^(\S.*||  [$>] \S.*)[ \t]\n', "trailing whitespace on non-output"),
   152     (uprefix + r'.*\|\s*sed[^|>\n]*\n',
   152     (uprefix + r'.*\|\s*sed[^|>\n]*\n',
   153      "use regex test output patterns instead of sed"),
   153      "use regex test output patterns instead of sed"),
   154     (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
   154     (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
   155     (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
   155     (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
   156     (uprefix + r'.*\|\| echo.*(fail|error)',
   156     (uprefix + r'.*\|\| echo.*(fail|error)',