Sign inSign up

daverona/pre-commit-php

By daverona

•Updated about 6 years ago

Image
0

1.2K

daverona/pre-commit-php repository overview

⁠daverona/pre-commit/php

pipeline status

This is a set of PHP hooks for pre-commit framework⁠.

⁠Overview

PHP hooks provided are:

  • phpmd⁠: static analyzer for PHP code
  • docker-phpmd: docker-version phpmd hook

⁠Hook Prerequisites

If you use Docker, don't need to install anything and skip this section.

⁠Hook Installation

To use PHP hooks, add the following code block to your .pre-commit-config.yaml:

- repo: https://gitlab.com/daverona/pre-commit/php
  rev: 0.6.0          # use the most recent version
  hooks:
  # Hooks using native
  - id: phpmd         # static analyzer for PHP code
  # Hooks using Docker
  - id: docker-phpmd  # phpmd in Docker container

You don't need to use non-docker version hook and its corresponding docker version at the same time. For instance, if you use docker-phpmd hook, phpmd hook is not required (and phpmd executable is not required to be installed).

⁠References

Tag summary

Content type

Image

Digest

Size

9.1 MB

Last updated

about 6 years ago

docker pull daverona/pre-commit-php