Commits

Martin Geisler committed 8b167ee

check-code: catch 'ls filename --option' case as per 6bdae8ea0b48

Comments (0)

Files changed (1)

contrib/check-code.py

     ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
     (r'^source\b', "don't use 'source', use '.'"),
     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
+    (r'ls\s+[^-]+\s+-', "options to 'ls' must come before filenames"),
 ]
 
 testfilters = [