chore [P-01]: влк

This commit is contained in:
Nukeap committed 2025-03-07 09:30:31 +03:00
1 parent 54b4b16e49
commit 36dc4e91db
4 files changed
+36 -21

No files matched your search

+29 -14
View File
@@ -4,30 +4,45 @@
# # Получение списка всех Vue/js/ts-файлов, подготовленных для коммита # # Получение списка всех Vue/js/ts-файлов, подготовленных для коммита
filesjs=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.vue$|\.js$|\.ts$'| grep -v 'test\.js$') filesjs=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.vue$|\.js$|\.ts$'| grep -v 'test\.js$')
echo $filesjs_modified
if [ -n "$filesjs" ]; then if [ -n "$filesjs" ]; then
filesjs_modified=$(echo "$filesjs" | sed 's|^src/front/src/|src/|'| tr '\n' ' ') filesjs_modified=$(echo "$filesjs" | sed 's|^src/front/src/|src/|'| tr '\n' ' ')
# Запускаем команду formatter в контейнере # Запускаем команду formatter в контейнере
echo $filesjs_modified
if [ "$(docker-compose -f docker-compose.yml ps -q frontend)" ]; then
docker-compose -f docker-compose.yml exec frontend sh -c "npm run formatter $filesjs_modified && npm run linter $filesjs_modified"
else
docker-compose -f docker-compose.yml run --rm frontend sh -c "npm run formatter $filesjs_modified && npm run linter $filesjs_modified" docker-compose -f docker-compose.yml run --rm frontend sh -c "npm run formatter $filesjs_modified && npm run linter $filesjs_modified"
fi
fi fi
if [ $? -ne 0 ]; then
echo "Ошибка: eslint обнаружил проблемы в коде."
exit 1 # Выход с кодом ошибки
fi
# # Получение списка всех Python-файлов, подготовленных для коммита # # Получение списка всех Python-файлов, подготовленных для коммита
pyfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$') pyfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')
# | sed 's|/|.|g; s|\.py$||' # # | sed 's|/|.|g; s|\.py$||'
echo $pyfiles_mod
# exit 1
# # Если нет Python-файлов, выход
# if [ -z "$files" ]; then
# exit 0
# fi
if [ -n "$pyfiles" ]; then
pyfiles_mod=$(echo "$pyfiles" | sed 's|^src/back/||'| tr '\n' ' ')
# Запуск pylint для всех подготовленных Python-файлов
docker-compose -f docker-compose.yml run --rm --entrypoint sh backend -c "poetry run isort $pyfiles_mod && poetry run black $pyfiles_mod && poetry run pylint $pyfiles_mod"
# echo 1
fi
if [ -n "$pyfiles" ]; then
pyfiles_mod=$(echo "$pyfiles" | sed 's|^src/back/||'| tr '\n' ' ')
if [ "$(docker-compose -f docker-compose.yml ps -q backend)" ]; then
echo $pyfiles_mod
docker-compose -f docker-compose.yml exec backend sh -c "poetry run isort $pyfiles_mod && poetry run black $pyfiles_mod && poetry run pylint $pyfiles_mod"
else
docker-compose -f docker-compose.yml run --rm --entrypoint sh backend -c "poetry run isort $pyfiles_mod && poetry run black $pyfiles_mod && poetry run pylint $pyfiles_mod"
fi
# # Запуск pylint для всех подготовленных Python-файлов
# # echo 1
fi
if [ $? -ne 0 ]; then
echo "Ошибка: pylint обнаружил проблемы в коде."
exit 1 # Выход с кодом ошибки
fi
+4 -4
View File
@@ -534,6 +534,10 @@ export default withMermaid({
"text": "MainmenuStore", "text": "MainmenuStore",
"link": "/src/store/MainmenuStore" "link": "/src/store/MainmenuStore"
}, },
{
"text": "UseAlertStore",
"link": "/src/store/UseAlertStore"
},
{ {
"text": "WeekendsStore", "text": "WeekendsStore",
"link": "/src/store/WeekendsStore" "link": "/src/store/WeekendsStore"
@@ -545,10 +549,6 @@ export default withMermaid({
{ {
"text": "index", "text": "index",
"link": "/src/store/index" "link": "/src/store/index"
},
{
"text": "useAlertStore",
"link": "/src/store/useAlertStore"
} }
] ]
}, },
@@ -1,9 +1,9 @@
# useAlertStore # UseAlertStore
Описание отсутствует. Описание отсутствует.
```js ```js
import * as useAlertStore from '@/components/store/useAlertStore'; import * as UseAlertStore from '@/components/store/UseAlertStore';
``` ```
--- ---
+1 -1
View File
@@ -1,6 +1,6 @@
[MASTER] [MASTER]
load-plugins=pylint_django load-plugins=pylint_django
ignore-paths=.*/migrations/*
init-hook='import sys; sys.path.append("/back/"); import os; os.environ["DJANGO_SETTINGS_MODULE"] = "portal.settings"; import django; django.setup()' init-hook='import sys; sys.path.append("/back/"); import os; os.environ["DJANGO_SETTINGS_MODULE"] = "portal.settings"; import django; django.setup()'
[FORMAT] [FORMAT]