diff --git a/sh/core/code.awk b/sh/core/code.awk index 3cfbc70..e910883 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -334,6 +334,9 @@ if (action == "doc") { unique[extract($0, target)] = "" } +# lint +} else if (action == "lint") { + # unknown } else { print "unknown action: " action diff --git a/sh/lint/gawk.sh b/sh/lint/gawk.sh new file mode 100644 index 0000000..67aad01 --- /dev/null +++ b/sh/lint/gawk.sh @@ -0,0 +1,12 @@ +# gawk + +#| gawk +rwx_gawk_lint() { + local file="${1}" + echo | + gawk \ + --posix \ + --lint="fatal" \ + --file "${file}" \ + --assign action="lint" +}