client: dev-tools: lib_linter: refactor with lib_docker::exec
This commit is contained in:
@@ -146,7 +146,7 @@ function lib_linter::__lint_bash()
|
|||||||
if [ -z "${_path[*]}" ]; then
|
if [ -z "${_path[*]}" ]; then
|
||||||
# Do all
|
# Do all
|
||||||
for _ext in "${_exts[@]}"; do
|
for _ext in "${_exts[@]}"; do
|
||||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
lib_docker::exec \
|
||||||
"find ${DOCKER_FINANCE_CLIENT_REPO}/ ${DOCKER_FINANCE_CLIENT_PLUGINS}/ -type f -name \*.${_ext} \
|
"find ${DOCKER_FINANCE_CLIENT_REPO}/ ${DOCKER_FINANCE_CLIENT_PLUGINS}/ -type f -name \*.${_ext} \
|
||||||
| while read _file
|
| while read _file
|
||||||
do echo Linting \'\${_file}\'
|
do echo Linting \'\${_file}\'
|
||||||
@@ -159,7 +159,7 @@ function lib_linter::__lint_bash()
|
|||||||
local _file
|
local _file
|
||||||
_file="$(dirs +1)/${_p}"
|
_file="$(dirs +1)/${_p}"
|
||||||
lib_utils::print_normal "Linting '${_file}'"
|
lib_utils::print_normal "Linting '${_file}'"
|
||||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
lib_docker::exec \
|
||||||
"$_shfmt $_file $_file && $_shellcheck $_file"
|
"$_shfmt $_file $_file && $_shellcheck $_file"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -182,7 +182,7 @@ function lib_linter::__lint_cpp()
|
|||||||
if [ -z "${_path[*]}" ]; then
|
if [ -z "${_path[*]}" ]; then
|
||||||
# Do all
|
# Do all
|
||||||
for _ext in "${_exts[@]}"; do
|
for _ext in "${_exts[@]}"; do
|
||||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
lib_docker::exec \
|
||||||
"find ${DOCKER_FINANCE_CLIENT_REPO}/ ${DOCKER_FINANCE_CLIENT_PLUGINS}/ -type f -name \*.${_ext} \
|
"find ${DOCKER_FINANCE_CLIENT_REPO}/ ${DOCKER_FINANCE_CLIENT_PLUGINS}/ -type f -name \*.${_ext} \
|
||||||
| while read _file
|
| while read _file
|
||||||
do echo Linting \'\${_file}\'
|
do echo Linting \'\${_file}\'
|
||||||
@@ -195,7 +195,7 @@ function lib_linter::__lint_cpp()
|
|||||||
local _file
|
local _file
|
||||||
_file="$(dirs +1)/${_p}"
|
_file="$(dirs +1)/${_p}"
|
||||||
lib_utils::print_normal "Linting '${_file}'"
|
lib_utils::print_normal "Linting '${_file}'"
|
||||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
lib_docker::exec \
|
||||||
"$_clang_format $_file && $_cpplint $_file && $_cppcheck $_file"
|
"$_clang_format $_file && $_cpplint $_file && $_cppcheck $_file"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -211,7 +211,7 @@ function lib_linter::__lint_php()
|
|||||||
|
|
||||||
if [ -z "${_path[*]}" ]; then
|
if [ -z "${_path[*]}" ]; then
|
||||||
# Do all
|
# Do all
|
||||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
lib_docker::exec \
|
||||||
"php-cs-fixer -n init \
|
"php-cs-fixer -n init \
|
||||||
&& $_php_cs_fixer $DOCKER_FINANCE_CLIENT_REPO && $_php_cs_fixer $DOCKER_FINANCE_CLIENT_PLUGINS \
|
&& $_php_cs_fixer $DOCKER_FINANCE_CLIENT_REPO && $_php_cs_fixer $DOCKER_FINANCE_CLIENT_PLUGINS \
|
||||||
&& $_phpstan $DOCKER_FINANCE_CLIENT_REPO $DOCKER_FINANCE_CLIENT_PLUGINS"
|
&& $_phpstan $DOCKER_FINANCE_CLIENT_REPO $DOCKER_FINANCE_CLIENT_PLUGINS"
|
||||||
@@ -221,7 +221,7 @@ function lib_linter::__lint_php()
|
|||||||
local _file
|
local _file
|
||||||
_file="$(dirs +1)/${_p}"
|
_file="$(dirs +1)/${_p}"
|
||||||
lib_utils::print_normal "Linting '${_file}'"
|
lib_utils::print_normal "Linting '${_file}'"
|
||||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
lib_docker::exec \
|
||||||
"$_php_cs_fixer $_file && $_phpstan $_file"
|
"$_php_cs_fixer $_file && $_phpstan $_file"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user