The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/Shellcheck.am

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # Global ShellCheck exclusions:
    2 #
    3 # ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090]
    4 # Not following: a was not specified as input (see shellcheck -x). [SC1091]
    5 # Prefer putting braces around variable references even when not strictly required. [SC2250]
    6 # Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore). [SC2312]
    7 # In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions
    8 # In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions
    9 
   10 SHELLCHECKSCRIPTS =
   11 
   12 JUST_SHELLCHECK_OPTS    = $(addprefix shellcheck-here-,$(subst /,^,$(1)))
   13 JUST_CHECKBASHISMS_OPTS = $(addprefix checkbashisms-here-,$(subst /,^,$(1)))
   14 SHELLCHECK_OPTS         = $(call JUST_SHELLCHECK_OPTS,$(1)) $(call JUST_CHECKBASHISMS_OPTS,$(1))
   15 
   16 PHONY += shellcheck
   17 
   18 _STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
   19 shellcheck-here-%:
   20 if HAVE_SHELLCHECK
   21         shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
   22 else
   23         @echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
   24 endif
   25 
   26 shellcheck: $(SHELLCHECKSCRIPTS) $(call JUST_SHELLCHECK_OPTS,$(SHELLCHECKSCRIPTS))
   27 
   28 
   29 PHONY += checkbashisms
   30 
   31 # command -v *is* specified by POSIX and every shell in existence supports it
   32 _BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
   33 checkbashisms-here-%:
   34 if HAVE_CHECKBASHISMS
   35         ! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
   36         checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
   37 else
   38         @echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
   39 endif
   40 
   41 checkbashisms: $(SHELLCHECKSCRIPTS) $(call JUST_CHECKBASHISMS_OPTS,$(SHELLCHECKSCRIPTS))

Cache object: da095b23c955cdfca193c2457f1fbfab


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.