client: dev-tools: lib_linter: add DOCKER_FINANCE_CLIENT_PLUGINS
This commit is contained in:
@@ -147,7 +147,7 @@ function lib_linter::__lint_bash()
|
||||
# Do all
|
||||
for _ext in "${_exts[@]}"; do
|
||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
||||
"find ${DOCKER_FINANCE_CLIENT_REPO}/ -type f -name \*.${_ext} \
|
||||
"find ${DOCKER_FINANCE_CLIENT_REPO}/ ${DOCKER_FINANCE_CLIENT_PLUGINS}/ -type f -name \*.${_ext} \
|
||||
| while read _file
|
||||
do echo Linting \'\${_file}\'
|
||||
$_shfmt \$_file \$_file && $_shellcheck \${_file}
|
||||
@@ -178,7 +178,7 @@ function lib_linter::__lint_cpp()
|
||||
# Do all
|
||||
for _ext in "${_exts[@]}"; do
|
||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
||||
"find ${DOCKER_FINANCE_CLIENT_REPO}/ -type f -name \*.${_ext} \
|
||||
"find ${DOCKER_FINANCE_CLIENT_REPO}/ ${DOCKER_FINANCE_CLIENT_PLUGINS}/ -type f -name \*.${_ext} \
|
||||
| while read _file
|
||||
do echo Linting \'\${_file}\'
|
||||
$_clang_format \$_file && $_cpplint \$_file && $_cppcheck \$_file
|
||||
@@ -207,8 +207,8 @@ function lib_linter::__lint_php()
|
||||
if [ -z "${_path[*]}" ]; then
|
||||
# Do all
|
||||
lib_docker::__docker_compose exec -it docker-finance /bin/bash -i -c \
|
||||
"$_php_cs_fixer $DOCKER_FINANCE_CLIENT_REPO \
|
||||
&& $_phpstan $DOCKER_FINANCE_CLIENT_REPO"
|
||||
"$_php_cs_fixer $DOCKER_FINANCE_CLIENT_REPO && $_php_cs_fixer $DOCKER_FINANCE_CLIENT_PLUGINS \
|
||||
&& $_phpstan $DOCKER_FINANCE_CLIENT_REPO $DOCKER_FINANCE_CLIENT_PLUGINS"
|
||||
else
|
||||
# Do only given file(s)
|
||||
for _p in "${_path[@]}"; do
|
||||
@@ -223,7 +223,7 @@ function lib_linter::__lint_php()
|
||||
|
||||
function lib_linter::__linter()
|
||||
{
|
||||
[ -z "$DOCKER_FINANCE_CLIENT_REPO" ] && lib_utils::die_fatal
|
||||
[[ -z "$DOCKER_FINANCE_CLIENT_REPO" || -z "$DOCKER_FINANCE_CLIENT_PLUGINS" ]] && lib_utils::die_fatal
|
||||
|
||||
[[ ! "$PWD" =~ ^$DOCKER_FINANCE_CLIENT_REPO && ! -z "${global_arg_file[*]}" ]] \
|
||||
&& lib_utils::die_fatal "Sorry, you must work (and lint) from within parent directory '${DOCKER_FINANCE_CLIENT_REPO}'"
|
||||
|
||||
Reference in New Issue
Block a user