Skip to content

Commit d375f44

Browse files
committed
minor #15024 Updated contribution guide with "Automated Feedback" (Nyholm)
This PR was submitted for the 5.x branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- Updated contribution guide with "Automated Feedback" Adding a note about psalm. Related PR: symfony/symfony#40291 Commits ------- 795dcb7 Updated contribution guide with "Automated Feedback"
2 parents 3ff1ecf + 795dcb7 commit d375f44

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

contributing/code/pull_requests.rst

+32
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,36 @@ The :doc:`core team </contributing/code/core_team>` is responsible for deciding
399399
which PR gets merged, so their feedback is the most relevant. So do not feel
400400
pressured to refactor your code immediately when someone provides feedback.
401401

402+
Automated Feedback
403+
~~~~~~~~~~~~~~~~~~
404+
405+
There are many automated scripts that will provide feedback on a pull request.
406+
407+
fabbot
408+
""""""
409+
410+
`fabbot`_ will review code style, check for common typos and make sure the git
411+
history looks good. If there are any issues, fabbot will often suggest what changes
412+
that should be done. Most of the time you get a command to run to automatically
413+
fix the changes.
414+
415+
It is rare, but fabbot could be wrong. One should verify if the suggested changes
416+
make sense and that they are related to the pull request.
417+
418+
Psalm
419+
"""""
420+
421+
`Psalm`_ will make a comment on a pull request if it discovers any potential
422+
type errors. The Psalm errors are not always correct, but each should be reviewed
423+
and discussed. A pull request should not update the Psalm baseline nor add ``@psalm-``
424+
annotations.
425+
426+
After the `Psalm phar is installed`_, the analysis can be run locally with:
427+
428+
.. code-block:: terminal
429+
430+
$ psalm.phar src/Symfony/Component/Workflow
431+
402432
.. _rework-your-patch:
403433

404434
Rework your Pull Request
@@ -430,8 +460,10 @@ before merging.
430460
.. _Symfony repository: https://github.com/symfony/symfony
431461
.. _`documentation repository`: https://github.com/symfony/symfony-docs
432462
.. _`fabbot`: https://fabbot.io
463+
.. _`Psalm`: https://psalm.dev/
433464
.. _`PSR-1`: https://www.php-fig.org/psr/psr-1/
434465
.. _`PSR-2`: https://www.php-fig.org/psr/psr-2/
435466
.. _`searching on GitHub`: https://github.com/symfony/symfony/issues?q=+is%3Aopen+
436467
.. _`Symfony Slack`: https://symfony.com/slack-invite
437468
.. _`Travis-CI`: https://travis-ci.org/symfony/symfony
469+
.. _`Psalm phar is installed`: https://psalm.dev/docs/running_psalm/installation/

0 commit comments

Comments
 (0)