fourtekit / laragrum
为Laravel提供源代码质量检查的composer插件。
Requires
- php: >=5.6.0
- composer-plugin-api: ~1.0
- composer/composer: ^1.0
- doctrine/collections: ~1.2
- gitonomy/gitlib: ^1.0.3
- monolog/monolog: ~1.16
- seld/jsonlint: ~1.1
- symfony/config: ~2.7|~3.0|~4.0
- symfony/console: ~2.7|~3.0|~4.0
- symfony/dependency-injection: ~2.7|~3.0|~4.0
- symfony/event-dispatcher: ~2.7|~3.0|~4.0
- symfony/filesystem: ~2.7|~3.0|~4.0
- symfony/finder: ~2.7|~3.0|~4.0
- symfony/options-resolver: ~2.7|~3.0|~4.0
- symfony/process: ~2.7|~3.0|~4.0
- symfony/yaml: ~2.7|~3.0|~4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1|~2
- jakub-onderka/php-parallel-lint: ^0.9.2
- nikic/php-parser: ~2.1
- phpspec/phpspec: ^3.2.2
- phpspec/prophecy: ^1.6.2
- phpunit/phpunit: ^5.7.27|^6.4.4
- sebastian/comparator: ^1.2.4
- sensiolabs/security-checker: ^4.0
- squizlabs/php_codesniffer: ~2.4
Suggests
- atoum/atoum: Lets GrumPHP run your unit tests.
- behat/behat: Lets GrumPHP validate your project features.
- codeception/codeception: Lets GrumPHP run your project's full stack tests
- codegyre/robo: Lets GrumPHP run your automated PHP tasks.
- designsecurity/progpilot: Lets GrumPHP be sure that there are no vulnerabilities in your code.
- doctrine/orm: Lets GrumPHP validate your Doctrine mapping files.
- friendsofphp/php-cs-fixer: Lets GrumPHP automatically fix your codestyle.
- infection/infection: Lets GrumPHP evaluate the quality your unit tests
- jakub-onderka/php-parallel-lint: Lets GrumPHP quickly lint your entire code base.
- maglnet/composer-require-checker: Lets GrumPHP analyze composer dependencies.
- malukenho/kawaii-gherkin: Lets GrumPHP lint your Gherkin files.
- nikic/php-parser: Lets GrumPHP run static analyses through your PHP files.
- phan/phan: Lets GrumPHP unleash a static analyzer on your code
- phing/phing: Lets GrumPHP run your automated PHP tasks.
- phpmd/phpmd: Lets GrumPHP sort out the mess in your code
- phpspec/phpspec: Lets GrumPHP spec your code.
- phpstan/phpstan: Lets GrumPHP discover bugs in your code without running it.
- phpunit/phpunit: Lets GrumPHP run your unit tests.
- povils/phpmnd: Lets GrumPHP help you detect magic numbers in PHP code.
- roave/security-advisories: Lets GrumPHP be sure that there are no known security issues.
- sebastian/phpcpd: Lets GrumPHP find duplicated code.
- sensiolabs/security-checker: Lets GrumPHP be sure that there are no known security issues.
- squizlabs/php_codesniffer: Lets GrumPHP sniff on your code.
- sstalle/php7cc: Lets GrumPHP check PHP 5.3 - 5.6 code compatibility with PHP 7.
- vimeo/psalm: Lets GrumPHP discover errors in your code without running it.
This package is not auto-updated.
Last update: 2024-09-19 10:08:55 UTC
README
这纯粹是受GrumPHP的启发。这只是一个GrumPHP的包装器。
厌倦了一次次地捍卫代码质量?GrumPHP会为你做这件事!这个composer插件会在你的包仓库中注册一些git钩子。当有人提交更改时,GrumPHP会在提交的代码上运行一些测试。如果测试失败,你将无法提交更改。这个实用的工具不仅可以改进你的代码库,还可以教导你的同事编写更好的代码,遵循团队确定的最佳实践。
GrumPHP内置了一套常用任务。你可以用最少的配置使用GrumPHP。
我们不想让你厌烦所有细节,所以简单地说:安装它,释放GrumPHP的力量!
演示
安装
如果你正在尝试在Windows上安装GrumPHP:请阅读Windows预安装部分。
此包是一个composer插件,应该使用composer将其安装到你的项目的开发依赖项中
composer require --dev FourtekIt/laraGrum
当包安装后,GrumPHP将将自己附加到项目的git钩子上。你将在composer日志中看到以下消息
小心!GrumPHP正在嗅探你的提交!
GrumPHP永远不会强迫你使用特定的任务。你可以选择适合你需求的任务,并且可以随时激活或停用任何任务!请参阅composer.json中的suggest
部分。
注意:除非你以--no-plugins
或--no-scripts
运行composer install
,否则GrumPHP会覆盖现有的钩子。在尝试安装GrumPHP之前,请务必备份你的钩子。
安装GrumPHP时遇到麻烦?了解如何
配置
GrumPHP中的一些内容可以在项目根目录(运行grumphp命令的目录)中的grumphp.yml
或grumphp.yml.dist
文件中进行配置。你可以在composer.json
或控制台命令的--config
选项中指定自定义配置文件名和位置。
# grumphp.yml parameters: bin_dir: "./vendor/bin" git_dir: "." hooks_dir: ~ hooks_preset: local stop_on_failure: false ignore_unstaged_changes: false hide_circumvention_tip: false process_async_limit: 10 process_async_wait: 1000 process_timeout: 60 ascii: failed: grumphp-grumpy.txt succeeded: grumphp-happy.txt tasks: ant: ~ atoum: ~ behat: ~ brunch: ~ clover_coverage: ~ codeception: ~ composer: ~ composer_require_checker: ~ composer_script: ~ deptrac: ~ doctrine_orm: ~ file_size: ~ gherkin: ~ git_blacklist: ~ git_branch_name: ~ git_commit_message: ~ grunt: ~ gulp: ~ infection: ~ jsonlint: ~ kahlan: ~ make: ~ npm_script: ~ phan: ~ phing: ~ php7cc: ~ phpcpd: ~ phpcs: ~ phpcsfixer: ~ phpcsfixer2: ~ phplint: ~ phpmd: ~ phpmnd: ~ phpparser: ~ phpspec: ~ phpstan: ~ phpunit: ~ phpversion: ~ progpilot: ~ psalm: ~ robo: ~ securitychecker: ~ shell: ~ xmllint: ~ yamllint: ~ testsuites: [] extensions: []
配置的详细信息分为以下部分。
命令
由于GrumPHP只是一个CLI工具,这些命令可以触发
兼容性
GrumPHP与PHP 5.6或更高版本兼容。
此包已与以下git客户端进行了测试
- CLI Unix
- CLI Mac
- CLI Windows
- PhpStorm Git
- Atlassian SourceTree
- Syntevo SmartGit
路线图
已经有大量任务可用,以确保你的团队能写出优秀的代码。在我们可以发布v1.0.0之前,还有一个主要部分缺失。
我们一直在寻找支持新的任务。如果您遗漏了某个任务,请随意在问题追踪器中记录问题或创建一个pull request。
缺少某个功能或者发现了bug?请在问题追踪器中记录!想帮忙?请随意联系我们!
解决问题
常见问题解答
关于
提交bug和功能请求
bug和功能请求在GitHub上跟踪。请在贡献代码之前查看我们的规则。
许可
GrumPHP遵循MIT许可协议。