Skip to content

PHPCodeSniffer

Actions
Check phpcs rules in the diff getting deployed
v1.0.0
Latest
Star (10)

Tags

 (1)

PHPCS Inspections - GitHub Action

A GitHub Action that can be used to run PHPCS inspections on the diff of patch being commited.

Installation

To use this GitHub Action, you must have access to GitHub Actions. GitHub Actions are currently only available in public beta (you must apply for access).

  1. Create a .github/main.workflow in your GitHub repo.
  2. Add the following code to the main.workflow file and commit it to the repo's master branch.
workflow "PHPCS Inspections" {
  resolves = ["Run phpcs inspection"]
  on = "push"
}

action "Run phpcs inspection" {
  uses = "rtCamp/rtCamp/action-phpcs-inspection@master"
  env = {
    DIFF_BASE="master"
  }
}

Environment Variables

# To compare the committed changes between master and the current branch. Default: origin/master.
DIFF_BASE=master

# Head commit from which diff will be taken. Default: `git rev-parse HEAD`
DIFF_HEAD=0fbe5466e1ec4eecb4bf0c7453ee4fa045ef3ebf

License

MIT © 2019 rtCamp

PHPCodeSniffer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Check phpcs rules in the diff getting deployed
v1.0.0
Latest

Tags

 (1)

PHPCodeSniffer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.