mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-02 19:26:18 -04:00
style: limit line length per file extension
Editorconfig can only act based on file extension and path, not attributes, it remains a mean only for multiple collaborators to use the same configuration on their editor. When it is too restrictive, such as not considering the file syntax, use a lint tool for the specific file type instead of trusting editorconfig. Changes were made to increase readability.
This commit is contained in:
parent
2d0bf9784d
commit
011a71a36d
37 changed files with 330 additions and 123 deletions
|
@ -27,8 +27,10 @@ escape_key(){
|
|||
## Get scriptlet command, else fail safe.
|
||||
get_scriptlet(){
|
||||
scriptlet="$1"
|
||||
scriptlet_begin="-- pkg:begin:${scriptlet} --"
|
||||
scriptlet_end="-- pkg:end:${scriptlet} --"
|
||||
scriptlet="$(sed -n \
|
||||
"/^<\!-- pkg:begin:${scriptlet} -->$/,/^<\!-- pkg:end:${scriptlet} -->$/p" \
|
||||
"/^<\!${scriptlet_begin}>$/,/^<\!${scriptlet_end}>$/p" \
|
||||
"${readme}" | sed '/^```.*/d;/^\S*$/d;/^<\!-- pkg:/d;s/^sudo //')"
|
||||
if test -z "${scriptlet}"; then
|
||||
echo true
|
||||
|
@ -159,7 +161,9 @@ if test "${1-}" = "test"; then
|
|||
shift
|
||||
fi
|
||||
|
||||
if echo "${@}" | grep -qE "(^scripts/| scripts/|/template.spec)" || test -z "${1-}"; then
|
||||
if echo "${@}" | grep -qE "(^scripts/| scripts/|/template.spec)" ||
|
||||
test -z "${1-}"
|
||||
then
|
||||
# shellcheck disable=SC2046
|
||||
set -- $(find salt/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' \
|
||||
| sort -d | tr "\n" " ")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue