All Projects → phpro → Grumphp

phpro / Grumphp

Licence: mit
Submitting bugs and feature requests

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Grumphp

App Githooks
Plugin-based system to run specific actions and checks when git hooks are triggered.
Stars: ✭ 5 (-99.86%)
Mutual labels:  code-quality, git-hooks
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+23.43%)
Mutual labels:  code-quality
composer-inheritance-plugin
Opinionated version of Wikimedia composer-merge-plugin to work in pair with Bamarni composer-bin-plugin.
Stars: ✭ 20 (-99.46%)
Mutual labels:  composer-plugin
Acf Pro Installer
A composer install helper for Advanced Custom Fields PRO
Stars: ✭ 265 (-92.8%)
Mutual labels:  composer-plugin
clang-tidy-pr-comments
Turn clang-tidy warnings and fixes to comments in your pull request
Stars: ✭ 24 (-99.35%)
Mutual labels:  code-quality
Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (-92.33%)
Mutual labels:  code-quality
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (-96.96%)
Mutual labels:  code-quality
Pmd
An extensible multilanguage static code analyzer.
Stars: ✭ 3,667 (-0.33%)
Mutual labels:  code-quality
Taylor
Measure Swift code metrics and get reports in Xcode, Jenkins and other CI platforms.
Stars: ✭ 300 (-91.85%)
Mutual labels:  code-quality
sonar-esql-plugin
Sonar plugin to analyze ESQL-sourcecode of IBM Integration Bus projects
Stars: ✭ 26 (-99.29%)
Mutual labels:  code-quality
codeclimate-duplication
Code Climate engine for code duplication analysis
Stars: ✭ 96 (-97.39%)
Mutual labels:  code-quality
elint
A easy way to lint your code
Stars: ✭ 38 (-98.97%)
Mutual labels:  git-hooks
Sonar Php
🐘 SonarPHP: PHP static analyzer for SonarQube & SonarLint
Stars: ✭ 288 (-92.17%)
Mutual labels:  code-quality
modular-git-hooks
A tool for organizing git hooks into directories of modular files.
Stars: ✭ 19 (-99.48%)
Mutual labels:  git-hooks
Eslint Plugin Import
ESLint plugin with rules that help validate proper imports.
Stars: ✭ 3,722 (+1.17%)
Mutual labels:  code-quality
netflix-like-ios
Application to demonstrate how I develop an iOS App with VIPER architecture in 5 days (Swift only)
Stars: ✭ 30 (-99.18%)
Mutual labels:  code-quality
code-review-good-practices
This repository was created to gets together many good practices around code review.
Stars: ✭ 49 (-98.67%)
Mutual labels:  code-quality
Wotan
Pluggable TypeScript and JavaScript linter
Stars: ✭ 271 (-92.63%)
Mutual labels:  code-quality
Static Review
✋ An extendible framework for version control hooks.
Stars: ✭ 330 (-91.03%)
Mutual labels:  git-hooks
Pylint
It's not just a linter that annoys you!
Stars: ✭ 3,733 (+1.47%)
Mutual labels:  code-quality

Github Actions AppVeyor Installs Packagist

Twitter Join the chat at https://gitter.im/phpro/grumphp

GrumPHP

Sick and tired of defending code quality over and over again? GrumPHP will do it for you! This composer plugin will register some git hooks in your package repository. When somebody commits changes, GrumPHP will run some tests on the committed code. If the tests fail, you won't be able to commit your changes. This handy tool will not only improve your codebase, it will also teach your co-workers to write better code following the best practices you've determined as a team.

GrumPHP has a set of common tasks built-in. You will be able to use GrumPHP with a minimum of configuration.

We don't want to bore you with all the details, so quick: install it yourself and unleash the power of GrumPHP!

Demo

demo

Installation

In order for this package to work, you have to make sure following tools are discoverable on the command-line:

  • php
  • composer
  • git

This package is a composer plugin and should be installed to your project's dev dependency using composer:

Install GrumPHP as a phar without dependencies:

composer require --dev phpro/grumphp-shim

Install GrumPHP with dependencies:

composer require --dev phpro/grumphp

Install GrumPHP without dependencies and automated git hooks through phive

phive install grumphp

When the package is installed, GrumPHP will attach itself to the git hooks of your project. You will see following message in the composer logs:

Watch out! GrumPHP is sniffing your commits!

GrumPHP will never push you into using a specific task. You can choose the tasks that fit your needs, and activate or deactivate any task in no time! See the suggest section in composer.json.

Note: GrumPHP will overwrite existing hooks unless you run composer install with --no-plugins or --no-scripts. We do create a backup of your git hook, but it's best to make sure you also have a backup of your custom hooks before you try to install GrumPHP.

Having trouble installing GrumPHP? Find out how to:

Configuration

Some things in GrumPHP can be configured in a grumphp.yml or grumphp.yml.dist file in the root of your project (the directory where you run the grumphp command). You can specify a custom config filename and location in composer.json or in the --config option of the console commands.

# grumphp.yml
grumphp:
    hooks_dir: ~
    hooks_preset: local
    git_hook_variables:
         VAGRANT_HOST_DIR: .
         VAGRANT_PROJECT_DIR: /var/www
         EXEC_GRUMPHP_COMMAND: exec
         ENV: {}
    stop_on_failure: false
    ignore_unstaged_changes: false
    hide_circumvention_tip: false
    process_timeout: 60
    ascii:
        failed: grumphp-grumpy.txt
        succeeded: grumphp-happy.txt
    parallel:
        enabled: true
        max_workers: 32
    fixer:
        enabled: true
        fix_by_default: false
    environment:
        files: []
        variables: {}
        paths: []
    tasks: {}
    testsuites: []
    extensions: []

Details of the configuration are broken down into the following sections.

Commands

Since GrumPHP is just a CLI tool, these commands can be triggered:

Compatibility

GrumPHP works with PHP 5.6 or above.

This package has been tested with following git clients:

  • CLI Unix
  • CLI Mac
  • CLI Windows
  • PhpStorm Git
  • Atlassian SourceTree
  • Syntevo SmartGit

Roadmap

Lots of tasks are already available to make sure your team writes great code. We are always looking to support new tasks. Feel free to log an issue or create a pull request for a task we forgot.

Are you missing a feature or did you find a bug? Log it in the issue tracker! Want to help out? Feel free to contact us!

FAQ

About

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub. Please take a look at our rules before contributing your code.

License

GrumPHP is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].