Skip to content

zolex/psalm-markdown-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Psalm Markdown Report

Release Version License Downloads

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>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages