Permalink
Browse files

Add more files to the wild blacklists.

  • Loading branch information...
Andy Chu
Andy Chu committed Sep 2, 2018
1 parent 70941c5 commit 76425d25f418577b2345f3d5cc7ae65a9762294e
Showing with 41 additions and 1 deletion.
  1. +5 −0 test/wild-not-osh.txt
  2. +19 −0 test/wild-not-shell.txt
  3. +17 −1 test/wild_report.py
View
@@ -1 +1,6 @@
# A list of files that are known not to conform to the OSH language.
distro/crankshaft/rpi_buildsystem/7_build_gpio2kbd.sh
esoteric/setup.shl/bin/setup # associative array ambiguity (key should be quoted)
exp/shootout/timing.sh # the $(( )) ambiguity
linux-4.8.7/tools/perf/perf-with-kcore.sh # another $(( )) ambiguity
View
@@ -1 +1,20 @@
# A list of files that are known not to be shell.
#
# Various reasons: ZSH constructs, other languages mixed in like emacs,
# embedded shell DSLs, etc.
books/wicked_cool_shell_scripts_2e/1/hilow_broken
illumos-gate/usr/src/lib/libshell/common/data/bash_pre_rc.sh
illumos-gate/usr/src/lib/libshell/common/scripts/shlint.sh
illumos-gate/usr/src/lib/libshell/common/scripts/shtinyurl.sh
illumos-gate/usr/src/lib/libshell/common/scripts/shcalc.sh
illumos-gate/usr/src/lib/libshell/common/scripts/termclock.sh
esoteric/shasm/shasm.sh
gnu/glibc-2.23/posix/tst-getconf.sh
gnu/glibc-2.23/posix/globtest.sh
google/kythe/kythe/extractors/openjdk/extract.sh
freebsd-11.1/usr.bin/uuencode/tests/regress.sh
freebsd-11.1/usr.bin/tr/tests/regress.sh
freebsd-11.1/usr.bin/sed/tests/regress.sh
freebsd-11.1/usr.bin/join/tests/regress.sh
linux-4.8.7/tools/perf/perf-completion.sh
View
@@ -589,13 +589,29 @@ def _ReadTaskFile(path):
def _ReadLinesToSet(path):
"""Read blacklist files like not-shell.txt and not-osh.txt.
TODO: Consider adding globs here? There are a lot of FreeBSD and illumos
files we want to get rid of.
Or we could probably do that in the original 'find' expression.
"""
result = set()
if not path:
return result
with open(path) as f:
for line in f:
result.add(line.strip())
# Allow comments. We assume filenames don't have #
i = line.find('#')
if i != -1:
line = line[:i]
line = line.strip()
if not line: # Lines that are blank or only comments.
continue
result.add(line)
return result

0 comments on commit 76425d2

Please sign in to comment.