Skip to content

Add checkstyle output format - #3034

Merged
TomasVotruba merged 6 commits into
masterfrom
checkstyle
Mar 19, 2020
Merged

Add checkstyle output format#3034
TomasVotruba merged 6 commits into
masterfrom
checkstyle

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Mar 19, 2020

Copy link
Copy Markdown
Member

Closes #3033

Ref #2743

How to Add Rector to Code Reviews?

# see https://github.com/staabm/annotate-pull-request-from-checkstyle
# .github/workflows/rector_checkstyle.yaml

name: Rector Checkstyle

on:
    pull_request: null
    push:
        branches:
            - master

jobs:
    check_fixtures:
        runs-on: ubuntu-latest
        steps:
            -   uses: actions/checkout@v2
            -   uses: shivammathur/setup-php@v1
                with:
                    php-version: 7.2
                    coverage: none # disable xdebug, pcov
                    tools: cs2pr

            -   run: composer install --no-progress
            -   run: |
                    bin/rector process src --set dead-code --dry-run--output-format=checkstyle | cs2pr

Thanks @staabm for inspiration ❤️

@TomasVotruba TomasVotruba changed the title Add --checkstyle output format Add checkstyle output format Mar 19, 2020
@TomasVotruba
TomasVotruba force-pushed the checkstyle branch 4 times, most recently from 19afad0 to e90f01a Compare March 19, 2020 00:25
@TomasVotruba
TomasVotruba force-pushed the checkstyle branch 4 times, most recently from eb9a5f0 to 30e22bb Compare March 19, 2020 13:08
@TomasVotruba
TomasVotruba merged commit 6668cfd into master Mar 19, 2020
@TomasVotruba
TomasVotruba deleted the checkstyle branch March 19, 2020 13:26
@staabm

staabm commented Mar 19, 2020

Copy link
Copy Markdown
Contributor

Really cool !

@nicholasruunu

Copy link
Copy Markdown

@TomasVotruba Was this removed? Can't seem to find it.

@TomasVotruba

Copy link
Copy Markdown
Member Author

Yes, see rectorphp/rector-src@f03cfa7

In the hindsight, this was not aligned with automated upgrade that Rector should be.
The checkstyle is suitable rather for static analyzers like PHPStan rules. If there is a need for checkstyle with Rector, you should make/look for a PHPStan rule.

TomasVotruba added a commit that referenced this pull request Nov 5, 2022
rectorphp/rector-src@64d0a83 [Php80][CodeQuality] Handle crash on ExplicitMethodCallOverMagicGetSetRector+ChangeSwitchToMatchRector (#3034)
TomasVotruba added a commit that referenced this pull request Nov 5, 2022
rectorphp/rector-src@64d0a83 [Php80][CodeQuality] Handle crash on ExplicitMethodCallOverMagicGetSetRector+ChangeSwitchToMatchRector (#3034)
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add checkstyle error output for error-matchers

3 participants