-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance: git, codesniffer, phpstan, makefile
- Loading branch information
Showing
6 changed files
with
43 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# Not archived | ||
.docs export-ignore | ||
tests export-ignore | ||
.github export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
Makefile export-ignore | ||
phpstan.neon export-ignore | ||
README.md export-ignore | ||
phpstan.neon export-ignore | ||
ruleset.xml export-ignore | ||
tests export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html | ||
|
||
.PHONY: install | ||
install: | ||
composer update | ||
|
||
.PHONY: qa | ||
qa: phpstan cs | ||
|
||
.PHONY: cs | ||
cs: | ||
ifdef GITHUB_ACTION | ||
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr | ||
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr | ||
else | ||
vendor/bin/codesniffer src tests | ||
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests | ||
endif | ||
|
||
.PHONY: csf | ||
csf: | ||
vendor/bin/codefixer src tests | ||
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests | ||
|
||
.PHONY: phpstan | ||
phpstan: | ||
vendor/bin/phpstan analyse -l max -c phpstan.neon src | ||
vendor/bin/phpstan analyse -c phpstan.neon | ||
|
||
.PHONY: tests | ||
tests: | ||
vendor/bin/tester -s -p php --colors 1 -C tests/cases | ||
|
||
coverage-clover: | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases | ||
vendor/bin/tester -s -p php --colors 1 -C tests/Cases | ||
|
||
coverage-html: | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases | ||
.PHONY: coverage | ||
coverage: | ||
ifdef GITHUB_ACTION | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases | ||
else | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<!-- Contributte Coding Standard --> | ||
<rule ref="./vendor/ninjify/coding-standard/contributte.xml"/> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="Contributte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> | ||
<!-- Rulesets --> | ||
<rule ref="./vendor/contributte/qa/ruleset-8.0.xml"/> | ||
|
||
<!-- Specific rules --> | ||
<!-- Rules --> | ||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> | ||
<properties> | ||
<property name="rootNamespaces" type="array"> | ||
<element key="src" value="Contributte\Comgate"/> | ||
<element key="tests/cases" value="Tests\Cases"/> | ||
<element key="src" value="Contributte\Middlewares"/> | ||
<element key="tests" value="Tests"/> | ||
</property> | ||
<property name="extensions" type="array"> | ||
<element key="php" value="php"/> | ||
<element key="phpt" value="phpt"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
|
||
<!--Exclude folders --> | ||
<!-- Excludes --> | ||
<exclude-pattern>/tests/tmp</exclude-pattern> | ||
</ruleset> |