##// END OF EJS Templates
check-code: forbid using bash in shebang...
Jun Wu -
r34062:e267d4ee default
parent child Browse files
Show More
@@ -119,7 +119,8 b' testpats = ['
119 (r'\[[^\]]+==', '[ foo == bar ] is a bashism, use [ foo = bar ] instead'),
119 (r'\[[^\]]+==', '[ foo == bar ] is a bashism, use [ foo = bar ] instead'),
120 (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',
120 (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',
121 "use egrep for extended grep syntax"),
121 "use egrep for extended grep syntax"),
122 (r'/bin/', "don't use explicit paths for tools"),
122 (r'(?<!!)/bin/', "don't use explicit paths for tools"),
123 (r'#!.*/bash', "don't use bash in shebang, use sh"),
123 (r'[^\n]\Z', "no trailing newline"),
124 (r'[^\n]\Z', "no trailing newline"),
124 (r'export .*=', "don't export and assign at once"),
125 (r'export .*=', "don't export and assign at once"),
125 (r'^source\b', "don't use 'source', use '.'"),
126 (r'^source\b', "don't use 'source', use '.'"),
@@ -159,7 +160,7 b' testpats = ['
159 ]
160 ]
160
161
161 testfilters = [
162 testfilters = [
162 (r"( *)(#([^\n]*\S)?)", repcomment),
163 (r"( *)(#([^!][^\n]*\S)?)", repcomment),
163 (r"<<(\S+)((.|\n)*?\n\1)", rephere),
164 (r"<<(\S+)((.|\n)*?\n\1)", rephere),
164 ]
165 ]
165
166
@@ -232,7 +233,7 b' for i in [0, 1]:'
232
233
233 utestfilters = [
234 utestfilters = [
234 (r"<<(\S+)((.|\n)*?\n > \1)", rephere),
235 (r"<<(\S+)((.|\n)*?\n > \1)", rephere),
235 (r"( +)(#([^\n]*\S)?)", repcomment),
236 (r"( +)(#([^!][^\n]*\S)?)", repcomment),
236 ]
237 ]
237
238
238 pypats = [
239 pypats = [
General Comments 0
You need to be logged in to leave comments. Login now