diff options
Diffstat (limited to 'scripts/verify-bashisms')
-rwxr-xr-x | scripts/verify-bashisms | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms index 14d8c298e9..ec2374f183 100755 --- a/scripts/verify-bashisms +++ b/scripts/verify-bashisms | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | import sys, os, subprocess, re, shutil | 6 | import sys, os, subprocess, re, shutil |
7 | 7 | ||
8 | whitelist = ( | 8 | allowed = ( |
9 | # type is supported by dash | 9 | # type is supported by dash |
10 | 'if type systemctl >/dev/null 2>/dev/null; then', | 10 | 'if type systemctl >/dev/null 2>/dev/null; then', |
11 | 'if type systemd-tmpfiles >/dev/null 2>/dev/null; then', | 11 | 'if type systemd-tmpfiles >/dev/null 2>/dev/null; then', |
@@ -19,8 +19,8 @@ whitelist = ( | |||
19 | '. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE' | 19 | '. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE' |
20 | ) | 20 | ) |
21 | 21 | ||
22 | def is_whitelisted(s): | 22 | def is_allowed(s): |
23 | for w in whitelist: | 23 | for w in allowed: |
24 | if w in s: | 24 | if w in s: |
25 | return True | 25 | return True |
26 | return False | 26 | return False |
@@ -49,7 +49,7 @@ def process(filename, function, lineno, script): | |||
49 | output = e.output.replace(fn.name, function) | 49 | output = e.output.replace(fn.name, function) |
50 | if not output or not output.startswith('possible bashism'): | 50 | if not output or not output.startswith('possible bashism'): |
51 | # Probably starts with or contains only warnings. Dump verbatim | 51 | # Probably starts with or contains only warnings. Dump verbatim |
52 | # with one space indention. Can't do the splitting and whitelist | 52 | # with one space indention. Can't do the splitting and allowed |
53 | # checking below. | 53 | # checking below. |
54 | return '\n'.join([filename, | 54 | return '\n'.join([filename, |
55 | ' Unexpected output from checkbashisms.pl'] + | 55 | ' Unexpected output from checkbashisms.pl'] + |
@@ -65,7 +65,7 @@ def process(filename, function, lineno, script): | |||
65 | # ... | 65 | # ... |
66 | # ... | 66 | # ... |
67 | result = [] | 67 | result = [] |
68 | # Check the results against the whitelist | 68 | # Check the results against the allowed list |
69 | for message, source in zip(output[0::2], output[1::2]): | 69 | for message, source in zip(output[0::2], output[1::2]): |
70 | if not is_whitelisted(source): | 70 | if not is_whitelisted(source): |
71 | if lineno is not None: | 71 | if lineno is not None: |