Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lander Vanderstraeten committed Oct 26, 2018
1 parent 137b126 commit e14e6b5
Show file tree
Hide file tree
Showing 18 changed files with 455 additions and 18 deletions.
33 changes: 32 additions & 1 deletion doc/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ parameters:
process_async_limit: 10
process_async_wait: 1000
process_timeout: 60
additonal_info: ~
ascii:
failed: resource/grumphp-grumpy.txt
succeeded: resource/grumphp-happy.txt
Expand Down Expand Up @@ -108,6 +109,28 @@ If you've got tools that run more then 60 seconds, you can increase this paramet
It is also possible to disable the timeout by setting the value to `null`.
When receiving a `Symfony\Component\Process\Exception\ProcessTimedOutException` during the execution of GrumPHP, you probably need to increment this setting.

**additional_info**

*Default: null*

This parameter will display additional information at the end of a `success` *or* `error` task.

```yaml
# grumphp.yml
parameters:
additional_info: "\nTo get full documentation for the project!\nVisit https://docs.example.com\n"
```

*Example Result:*
```
GrumPHP is sniffing your code!
Running task 1/1: Phpcs... ✔

To get full documentation for the project!
Visit https://docs.example.com

```
**ascii**
*Default: {failed: grumphp-grumpy.txt, succeeded: grumphp-happy.txt}*
Expand All @@ -132,7 +155,15 @@ parameters:
- resource/grumphp-happy3.txt
```

To disable banner set ascii images path to `~`:
To disable all banners set ascii to `~`:

```yaml
# grumphp.yml
parameters:
ascii: ~
```
To disable a specific banner set ascii image path to `~`:

```yaml
# grumphp.yml
Expand Down
6 changes: 3 additions & 3 deletions doc/tasks/composer_require_checker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ parameters:
**composer_file**
*Default: ~*
*Default: null*
The composer.json of your code base that should be checked.
**config_file**
*Default: ~*
*Default: null*
Composer Require Checker is configured to whitelist some symbols by default. You can now override this configuration
with your own and tell GrumPHP to use that configuration file instead.
Expand All @@ -44,6 +44,6 @@ This option is only available in version 0.2.0 of `maglnet/composer-require-chec

**triggered_by**

*Default: ['composer.json', 'composer.lock', '*.php']*
*Default: ['composer.json', 'composer.lock', '\*.php']*

This is a list of file names that should trigger this task.
74 changes: 74 additions & 0 deletions doc/tasks/git_commit_message.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ parameters:
git_commit_message:
allow_empty_message: false
enforce_capitalized_subject: true
enforce_no_subject_punctuations: false
enforce_no_subject_trailing_period: true
enforce_single_lined_subject: true
type_scope_conventions: []
max_body_width: 72
max_subject_width: 60
matchers:
Expand All @@ -33,6 +35,12 @@ Controls whether or not empty commit messages are allowed.
Ensures that the commit message subject line starts with a capital letter.
**enforce_no_subject_punctuations**
*Default: false*
Ensures that the commit message subject line doesn't have any punctuations characters.
**enforce_no_subject_trailing_period**
*Default: true*
Expand Down Expand Up @@ -95,3 +103,69 @@ additional_modifiers: 'u'

additional_modifiers: 'xu'
```
**type_scope_conventions**
*Default: []*
Enable a commonly used convention for the subject line.
Format is as follows:
```
type[(scope)]: subject
```
*The scope is optional*
Good examples:
```
fix: Security issue with password hashing
fix(Password): Security issue with password hashing
```
**types**
*Default: []*
*To be used with `type_scope_conventions`*

Specify a list of acceptable types. Default allows ***all*** types.

Add one or multiple types like:
```yaml
type_scope_conventions:
- types:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
- scopes: []
```

**scopes**

*Default: []*

*To be used with `type_scope_conventions`*

Specify a list of acceptable scopes. Default allows ***all*** scopes.

Add one or multiple scopes like:
```yaml
type_scope_conventions:
- types: []
- scopes:
- api
- index
- user
- language
- browser
- environment
```

4 changes: 2 additions & 2 deletions doc/tasks/phpstan.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ parameters:
**autoload_file**
*Default: ~*
*Default: null*
With this parameter you can specify the path your project's additional autoload file path.
**configuration**
*Default: ~*
*Default: null*
With this parameter you can specify the path your project's configuration file.
Expand Down
2 changes: 1 addition & 1 deletion doc/tasks/phpversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It lives under the `phpversion` namespace and has following configurable paramet
parameters:
tasks:
phpversion:
project: '7.0'
project: '7.2'
```
**project**
Expand Down
4 changes: 2 additions & 2 deletions doc/tasks/psalm.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parameters:
**config**
*Default: ~*
*Default: null*
With this parameter you can specify the path your project's configuration file.
Expand All @@ -48,7 +48,7 @@ With this parameter you can run Psalm without using the cache file.
**report**
*Default: ~*
*Default: null*
With this path you can specify the path your psalm report file
Expand Down
1 change: 1 addition & 0 deletions resources/config/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ parameters:
git_dir: .
hooks_dir: ~
hooks_preset: local
additional_info: ~
tasks: []
testsuites: []
stop_on_failure: false
Expand Down
1 change: 1 addition & 0 deletions resources/config/util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ services:
'5.6': '2018-12-31 23:59:59'
'7.0': '2018-12-03 23:59:59'
'7.1': '2019-12-01 23:59:59'
'7.2': '2020-11-30 23:59:59'
8 changes: 8 additions & 0 deletions spec/Configuration/GrumPHPSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,12 @@ function it_should_know_all_testsuites(ContainerInterface $container)
$container->getParameter('grumphp.testsuites')->willReturn($testSuites = new TestSuiteCollection());
$this->getTestSuites()->shouldBe($testSuites);
}

function it_knows_the_additional_info(ContainerInterface $container)
{
$container->getParameter('additional_info')
->willReturn('https://docs.example.com');

$this->getAdditionalInfo()->shouldReturn('https://docs.example.com');
}
}
1 change: 1 addition & 0 deletions spec/Console/Helper/TaskRunnerHelperSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function let(
$runnerContext->hasTestSuite()->willReturn(false);
$runnerContext->skipSuccessOutput()->willReturn(false);

$config->getAdditionalInfo()->willReturn(null);
$config->hideCircumventionTip()->willReturn(false);
}

Expand Down
Loading

0 comments on commit e14e6b5

Please sign in to comment.