From 3545d3ba83a486b077b2d1d141ea871bb47a29fb Mon Sep 17 00:00:00 2001 From: fox Date: Thu, 29 Sep 2022 17:23:40 +0300 Subject: [PATCH] Update 'CONTRIBUTING.md' --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 033175ca7..ee4f26be5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,7 @@ TLDR: it works like Github. 1. Register on the [development website](https://dev.tt-rss.org); 2. Fork the repository you're interested in; 3. Do the needful; +4. Verify that your changes pass through PHPStan (see below); 4. File a PR against master branch; If you have any other questions, see this [forum thread](https://discourse.tt-rss.org/t/how-to-contribute-code-via-pull-requests-on-git-tt-rss-org/1850). @@ -12,6 +13,16 @@ If you have any other questions, see this [forum thread](https://discourse.tt-rs Please don't inline patches in forum posts, attach files instead (``.patch`` or ``.diff`` file extensions should work). +## PHPStan + +Here's an example on how to run the analyzer using Docker: + +```sh +docker run --rm -v $(pwd):/app -v /tmp/phpstan-8.1:/tmp/phpstan --workdir /app php:8.1-cli php -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw +``` + +Any errors break CI pipeline so you'll have to make sure it's clean. + ## Contributing translations Believe it or not, people also spam using Weblate. Therefore, some minor jumping through hoops is involved here: