zolex / psalm-markdown-report
A Psalm plugin to write Markdown reports
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:psalm-plugin
Requires
- php: >=8.1
- ext-simplexml: *
- vimeo/psalm: ^5.0|^6.0
Requires (Dev)
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2025-05-23 23:21:33 UTC
README
Psalm 5 and 6 plugin to generate Markdown reports.
Installation
composer require --dev zolex/psalm-markdown-report
vendor/bin/psalm-plugin enable Zolex\PsalmMarkdownReport\Plugin
Configuration
If you want to use the markdown report in github pull request comment, you should provide the branch in en environment variable of your action so the file links in the report point to the branch of the pull request
MARKDOWN_LINK_BRANCH=feature/something
A github action to add the report as a PR comment could look as follows:
steps: - name: Run Psalm env: MARKDOWN_LINK_BRANCH: ${{ github.head_ref || github.ref_name }} run: tools/psalm/vendor/bin/psalm - name: Add report to PR uses: mshick/add-pr-comment@v2 with: message-path: ./psalm-report.md message-id: psalm
By default, the plugin writes the file psalm-report.md
in the working directory. You can change it in psalm.xml
or psalm.xml.dist
by adding a reportPath
element in the plugin config
<plugins> <pluginClass class="Zolex\PsalmMarkdownReport\Plugin"> <reportPath>./folder/report.markdown</reportPath> </pluginClass> </plugins>