Commit Graph

3 Commits

Author SHA1 Message Date
Linus Lüssing
7f47038026 scripts: lint-sh: ignore POSIX string replacement warnings [SC3060]
This ignores the following warning:

  warning: In POSIX sh, string replacement is undefined. [SC3060]

As string replacements are supported by ash and we are only going to use
ash.

This allows us to use something short like ${QUERY_STRING//+/ } to
replace all '+' to a whitespace in an URL or to make an ${IFNAME//-/_}
UCI compatible in the future, for example. Instead of needing to use
something long like "echo ${IFNAME} | tr '-' '_'.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2022-12-09 18:29:10 +01:00
Matthias Schiffer
f32c683601
scripts: lint-sh: ignore warnings about POSIX sh compatiblity
The following features are available in Busybox ash, so we don't need to
warn about them for runtime scripts:

- local keyword
- echo -n / -e
- String indexing

These warnings are new in shellcheck 0.7.2, which would otherwise fail
for various scripts.
2022-01-03 03:25:27 +01:00
Jan-Tarek Butt
a2ced263ab
build: add make targets lint, lint-sh, lint-lua
[Matthias Schiffer: minor script improvements]
2019-12-29 15:18:50 +01:00