Skip to content

Commit 5136ee4

Browse files
IN-1729 - Introduce make sniff and sniff-fix to run code style check on self
* Imortant: not to fix 'not-allowed' files which are expected to be broken!
1 parent abe042b commit 5136ee4

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ COMPOSER_BIN=$(PHP_BIN) composer.phar
44
# ---------------------------------------------
55

66
# make
7-
.DEFAULT_GOAL := install-dev
7+
.DEFAULT_GOAL := install
88

9-
# make test
10-
test:
11-
$(PHP_BIN) tests/runner.php
12-
13-
# make install
149
install:
10+
$(COMPOSER_BIN) install
1511

16-
# ---------------------------------------------
17-
# functions
12+
sniff:
13+
$(PHP_BIN) vendor/bin/phpcs -w -p -s --standard=ruleset.xml --ignore="tests/*not-allowed*" custom-standards/ tests/
1814

19-
install-dev:
20-
$(COMPOSER_BIN) install
15+
sniff-fix:
16+
$(PHP_BIN) vendor/bin/phpcbf -w -p -s --standard=ruleset.xml --ignore="tests/*not-allowed*" custom-standards/ tests/
17+
18+
test:
19+
$(PHP_BIN) tests/runner.php

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt).
2323

2424
To prepare run command:
2525
```bash
26-
make
26+
make install
27+
```
28+
29+
To check code style compliance or to fix what can be autofixed run commands:
30+
```bash
31+
make sniff
32+
make sniff-fix
2733
```
2834

2935
To test ruleset run command:

0 commit comments

Comments
 (0)