Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Commit d817e37

Browse files
committed
Update 'make' shortcuts and describe them in README
1 parent cb1a82d commit d817e37

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
all: install cs test
2+
3+
install:
4+
composer install
5+
16
cs:
27
php vendor/bin/phpcs
38

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
[![Build Status](https://travis-ci.org/Saritasa/php-laravel-fluent-validation.svg?branch=master)](https://travis-ci.org/Saritasa/php-laravel-fluent-validation)
44
[![codecov](https://codecov.io/gh/Saritasa/php-laravel-fluent-validation/branch/master/graph/badge.svg)](https://codecov.io/gh/Saritasa/php-laravel-fluent-validation)
5+
[![Release](https://img.shields.io/github/release/saritasa/php-laravel-fluent-validation.svg)](https://github.com/Saritasa/php-laravel-fluent-validation/releases)
6+
[![PHPv](https://img.shields.io/packagist/php-v/saritasa/laravel-fluent-validation.svg)](http://www.php.net)
7+
[![Downloads](https://img.shields.io/packagist/dt/saritasa/laravel-fluent-validation.svg)](https://packagist.org/packages/saritasa/laravel-fluent-validation)
58

69
Use fluent-style syntax to build [Laravel validation rules](https://laravel.com/docs/5.4/validation#available-validation-rules)
710

@@ -70,14 +73,30 @@ Root of your rule builder.
7073

7174
## Contributing
7275

73-
1. Create fork
74-
2. Checkout fork
75-
3. Develop locally as usual. **Code must follow [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/)**
76-
4. Run [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) to ensure, that code follows style guides,
77-
and [PHPUnit](https://phpunit.de/) to ensure, that unit tests still pass.
78-
5. Add unit tests, that cover added or changed functionality.
79-
6. Update [README.md](README.md) to describe new or changed functionality. Add changes description to [CHANGES.md](CHANGES.md) file.
80-
7. When ready, create pull request
76+
1. Create fork, checkout it
77+
2. Develop locally as usual. **Code must follow [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/)** -
78+
run [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) to ensure, that code follows style guides
79+
3. **Cover added functionality with unit tests** and run [PHPUnit](https://phpunit.de/) to make sure, that all tests pass
80+
4. Update [README.md](README.md) to describe new or changed functionality.
81+
5. Add changes description to [CHANGES.md](CHANGES.md) file.
82+
6. When ready, create pull request
83+
84+
### Make shortcuts
85+
86+
If you have [GNU Make](https://www.gnu.org/software/make/) installed, you can use following shortcuts:
87+
88+
* ```make cs``` (instead of ```php vendor/bin/phpcs```) -
89+
run static code analysis with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
90+
to check code style
91+
* ```make csfix``` (instead of ```php vendor/bin/phpcbf```) -
92+
fix code style violations with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
93+
automatically, where possible (ex. PSR-2 code formatting violations)
94+
* ```make test``` (instead of ```php vendor/bin/phpunit```) -
95+
run tests with [PHPUnit](https://phpunit.de/)
96+
* ```make install``` - instead of ```composer install```
97+
* ```make all``` or just ```make``` without parameters -
98+
invokes described above **install**, **cs**, **test** tasks sequentially -
99+
project will be assembled, checked with linter and tested with one single command
81100

82101
## Resources
83102

0 commit comments

Comments
 (0)