Coder Social home page Coder Social logo

l11's Introduction

API документация

используется пакет darkaonline/l5-swagger, документация описывается через атрибуты оберткой над которой использует этот пакет Swagger-PHP. Описанная документация тестируется с помощью пакета spectator. Дока находиться по пути /api/documentation, обновляется автоматически при посещении данной страницы.

Анализатор кода

Для проверки стиля кода и исправление синтаксических ошибок используется пакет PHP Insights

docker compose exec php php artisan insights --fix

для проверки когнитивной сложности кода - cognitive-complexity, для своей работы он использует phpStan, конфиг находиться в файле - phpstan.neon

docker compose exec php vendor/bin/phpstan

Эти команда запускаются перед коммитом

Поиск не используемых зависимостей

используется пакет - composer-unused

# запуск
docker compose exec php ./vendor/bin/composer-unused

если пакет нужно исключить из проверки, прописываем название пакета в файле - composer-unused.php

Поиск секретов в гит истории

используется пакет - gitleaks

# пулим последнюю актуальную версию
docker pull zricethezav/gitleaks:latest
# запускаем проверку
docker run -v ./:/path zricethezav/gitleaks:latest protect \
    --source="/path" \
    --config=/path/.gitleaks.toml \
    --report-path=/path/gitleaks-report.json \
    --staged

настройки в файле .gitleaks.toml, отчет в файле - gitleaks-report.json вызывается на pre-commit

Branch naming

Requirement described in the file

.validate-branch-namerc.json

branch name auto validate on pre-push hook using validate-branch-name package

Commit convention

Each commit message must follow the commit convention

Automatic message validation on commit-msg git hook. All setting described in the file

commitlint.config.js

Commit WIP

когда что-то не сделано, а нужно коммитить а валидация не позволяет запушить, тогда используем - WIP(work in progress) commit алгоритм таков:

# commit 
git commit -m 'wip: some text' --no-verify # or just 'wip'  
git push --no-verify
# вернулись к работе
git reset HEAD~

Следующий пуш ОБЯЗАТЕЛЬНО з -f опцией - force push.

l11's People

Contributors

romaxa83 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.