on: pull_request
name: Inspections

permissions:
  contents: read
  pull-requests: write

jobs:
  runPHPCSInspection:
    name: Run PHPCS inspection
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v6
      with:
        ref: ${{ github.event.pull_request.head.sha }}
    - name: Run PHPCS inspection
      uses: rtCamp/action-phpcs-code-review@master
      env:
        SKIP_FOLDERS: "tests,.github,lib,node_modules,vendor"
        GH_BOT_TOKEN: ${{ secrets.RTBOT_TOKEN }}
        PHPCS_SNIFFS_EXCLUDE: "WordPress.Files.FileName"
      with:
        args: WordPress,WordPress-Core,WordPress-Docs