Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Using phpro/grumphp for local quality check #92

Merged
merged 1 commit into from
Mar 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions design-documents/grumphp_check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Using phpro/grumphp for local quality check


## Why?
As a developer, you need fast feedback if you working on a pull request.
Currently, you get feedback from Travis after hours or days. With GrumPHP, the code can be quickly checked on every commit.

## Benefits:
- Quik feedback for developers
- Better commits (fewer `fix phpcs style` commits)

Sample Config:
```yml
parameters:
bin_dir: "./vendor/bin"
git_dir: "."
hooks_dir: ~
hooks_preset: local
stop_on_failure: false
ignore_unstaged_changes: false
ascii:
succeeded: ~
failed: ~
tasks:
phpversion:
project: '7.1'
xmllint:
ignore_patterns: ["src/dev"]
yamllint:
ignore_patterns: ["src/dev"]
securitychecker:
lockfile: ./src/composer.lock
format: ~
end_point: ~
timeout: ~
run_always: false
git_blacklist:
keywords:
- "die("
- "var_dump("
- "print_r("
- "var_export("
- "exit;"
whitelist_patterns:
- /^src\/app\/(.*)/
triggered_by: ['php']
phpmnd:
directory: ./src/app/code
whitelist_patterns: []
exclude: []
exclude_name: []
exclude_path: []
extensions: []
hint: false
ignore_numbers: []
ignore_strings: []
strings: false
triggered_by: ['php']
phpcs:
standard: "./src/dev/tests/static/framework/Magento/ruleset.xml"
severity: ~
error_severity: ~
warning_severity: 6
tab_width: ~
report: summary
report_width: ~
whitelist_patterns:
- /^src\/app\/code\/(.*)/
encoding: ~
ignore_patterns: []
sniffs: []
triggered_by: [php]
phpunit:
config_file: ./dev/tests/phpunit-no-coverage.xml
testsuite: ~
group: []
always_execute: false
```