CI: prepare for enabling shellcheck warnings and info

- Assume /bin/sh has dash's features and ignore corresponding false positives

- Exclude parser/tst, tests and utils/test directories: they have tons
  of shellcheck violations but they don't *directly* impact our users.
  Let's first focus on code that runs on production systems.

- Exclude rc.apparmor.slackware: I don't know anything about Slackware's
  /bin/sh.
This commit is contained in:
intrigeri 2022-02-13 08:25:40 +00:00
parent 5a6f6c2fc8
commit 804e8f94a6
2 changed files with 14 additions and 2 deletions

10
.shellcheckrc Normal file
View file

@ -0,0 +1,10 @@
# Don't follow source'd scripts
disable=SC1090
disable=SC1091
# dash supports 'local'
disable=SC2039
disable=SC3043
# dash supports 'echo -n'
disable=SC3037

View file

@ -8,8 +8,10 @@ from pathlib import Path
def is_excluded(f):
return re.match(r"^([.]git)/",
f) or Path(f).is_dir()
return (re.match(
r"^([.]git/|parser/tst/|tests/|utils/test/|parser/rc[.]apparmor[.]slackware)",
f,
) or Path(f).is_dir())
def mimetype(f):