You can use it as a Github Action like this:
.github/workflows/rector.yml
on: [push, pull_request]
name: rector
jobs:
rector:
name: Rector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rector
uses: zingimmick/[email protected]
to use for lint:
.github/workflows/rector.yml
on: [push, pull_request]
name: rector
jobs:
rector:
name: Rector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rector
uses: zingimmick/[email protected]
+ with:
+ args: --dry-run
to use a custom config for example, --dry-run and --clear-cache option:
on: [push, pull_request]
name: lint
jobs:
rector:
name: Rector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rector
uses: zingimmick/[email protected]
+ with:
+ args: --config=rector.yaml --dry-run --clear-cache
You can copy/paste the .github folder (under examples/) to your project and that's all!