Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdecool/phpstan-report
Enhance PHPStan analysis by providing report analysis
https://github.com/jdecool/phpstan-report
hacktoberfest
Last synced: about 2 months ago
JSON representation
Enhance PHPStan analysis by providing report analysis
- Host: GitHub
- URL: https://github.com/jdecool/phpstan-report
- Owner: jdecool
- License: mit
- Created: 2024-07-28T19:49:06.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T19:32:19.000Z (3 months ago)
- Last Synced: 2024-10-20T06:58:56.328Z (3 months ago)
- Topics: hacktoberfest
- Language: PHP
- Homepage:
- Size: 116 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PHPStan Report
==============[![Build Status](https://github.com/jdecool/phpstan-report/actions/workflows/ci.yaml/badge.svg)](https://actions-badge.atrox.dev/jdecool/phpstan-report/goto?ref=main)
[![License](https://poser.pugx.org/jdecool/phpstan-report/license)](https://packagist.org/packages/jdecool/phpstan-report)
[![Latest Stable Version](https://poser.pugx.org/jdecool/phpstan-report/v/stable)](https://packagist.org/packages/jdecool/phpstan-report)
[![Latest Unstable Version](https://poser.pugx.org/jdecool/phpstan-report/v/unstable)](https://packagist.org/packages/jdecool/phpstan-report)A simple wrapper around PHPStan to extends PHPStan's functionality by providing a customizable report generation feature.
It allows you to run PHPStan analysis and generate reports on ignored errors in various formats.## Installation
You can install the package via composer:
```bash
composer require --dev jdecool/phpstan-report
```## Usage
The main command provided by this package is `analyze`. Here's the basic usage:
```bash
$ php vendor/bin/phpstan-report analyze
```## Options
* `--report-output-format`: Specify the output format for the report
* `--report-without-analyze`: Generate a report without running the PHPStan analysis
* `--report-continue-on-error`: Continue report generation even if the analysis fails
* `--report-maximum-allowed-errors`: Set the maximum number of allowed errors
* `--report-sort-by`: Sort the report results (options: identifier, counter)
* `--report-exclude-identifier`: Identifier to exclude from the report (accepts multiple values)
* `--report-file-`: Export report in an output file for a particular formatAvailable formats are: `text`, `html`, `json` and `gitlab`.
For a full list of options, run:
```bash
$ php vendor/bin/phpstan-report analyze --help
```## Examples
Run analysis and generate a text report:
```bash
$ php vendor/bin/phpstan-report analyze src tests
```Generate an HTML report without running analysis:
```bash
$ php vendor/bin/phpstan-report analyze --report-without-analyze --report-output-format=html
```Run analysis, continue on error, and save report to a file:
```bash
$ php vendor/bin/phpstan-report analyze --report-continue-on-error --report-file-json=report.json src
```