-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from lcobucci/improve-qa-checks
Improve QA checks
- Loading branch information
Showing
13 changed files
with
139 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/test export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/test export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.travis.yml export-ignore | ||
/README.md export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/.travis.yml export-ignore | ||
/README.md export-ignore | ||
/*.xml.dist 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
vendor | ||
phpunit.xml | ||
composer.lock | ||
humbuglog.txt | ||
coverage | ||
/vendor | ||
/phpunit.xml | ||
/phpcs.xml | ||
/composer.lock | ||
/.phpcs.cache | ||
/infection-log.txt | ||
/phpstan.neon |
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,66 +1,37 @@ | ||
build: | ||
environment: | ||
mysql: false | ||
postgresql: false | ||
redis: false | ||
rabbitmq: false | ||
php: | ||
version: 7.1.0 | ||
tools: | ||
php_sim: true | ||
php_pdepend: true | ||
php_analyzer: true | ||
php_changetracking: true | ||
sensiolabs_security_checker: true | ||
php_mess_detector: true | ||
php_code_coverage: true | ||
external_code_coverage: | ||
timeout: 1800 | ||
php_code_sniffer: | ||
enabled: true | ||
config: | ||
standard: "PSR2" | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: ["test", "vendor"] | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: ["test", "vendor"] | ||
nodes: | ||
analysis: | ||
environment: | ||
mysql: false | ||
postgresql: false | ||
redis: false | ||
rabbitmq: false | ||
mongodb: false | ||
php: | ||
version: 7.2 | ||
cache: | ||
disabled: false | ||
directories: | ||
- ~/.composer/cache | ||
|
||
project_setup: | ||
override: true | ||
tests: | ||
override: | ||
- php-scrutinizer-run | ||
- phpcs-run | ||
|
||
dependencies: | ||
override: | ||
- composer install --no-interaction --prefer-dist | ||
|
||
checks: | ||
php: | ||
code_rating: true | ||
duplication: true | ||
argument_type_checks: true | ||
assignment_of_null_return: true | ||
avoid_conflicting_incrementers: true | ||
avoid_useless_overridden_methods: true | ||
catch_class_exists: true | ||
closure_use_modifiable: true | ||
closure_use_not_conflicting: true | ||
deprecated_code_usage: true | ||
method_calls_on_non_object: true | ||
missing_arguments: true | ||
no_duplicate_arguments: true | ||
no_non_implemented_abstract_methods: true | ||
no_property_on_interface: true | ||
parameter_non_unique: true | ||
precedence_in_conditions: true | ||
precedence_mistakes: true | ||
require_php_tag_first: true | ||
security_vulnerabilities: true | ||
sql_injection_vulnerabilities: true | ||
too_many_arguments: true | ||
unreachable_code: true | ||
unused_methods: true | ||
unused_parameters: true | ||
unused_properties: true | ||
unused_variables: true | ||
use_statement_alias_conflict: true | ||
useless_calls: true | ||
variable_existence: true | ||
verify_access_scope_valid: true | ||
verify_argument_usable_as_reference: true | ||
verify_property_names: true | ||
filter: | ||
excluded_paths: | ||
- test/* | ||
php: true | ||
|
||
tools: | ||
external_code_coverage: true | ||
|
||
build_failure_conditions: | ||
- 'elements.rating(<= C).new.exists' | ||
- 'issues.severity(>= MAJOR).new.exists' | ||
- 'project.metric_change("scrutinizer.test_coverage", < -0.01)' |
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,22 +1,54 @@ | ||
dist: trusty | ||
language: php | ||
sudo: false | ||
|
||
php: | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_script: | ||
- if [[ $TRAVIS_PHP_VERSION = '7.1' ]]; then PHPUNIT_FLAGS="--coverage-clover ./clover.xml"; else PHPUNIT_FLAGS=""; fi | ||
before_install: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available" | ||
- composer self-update | ||
- composer install | ||
|
||
install: travis_retry composer install | ||
|
||
script: | ||
- ./vendor/bin/phpunit $PHPUNIT_FLAGS | ||
- ./vendor/bin/phpunit | ||
|
||
jobs: | ||
allow_failures: | ||
- php: nightly | ||
|
||
include: | ||
- stage: Metrics and quality | ||
env: COVERAGE | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi | ||
script: | ||
- ./vendor/bin/phpunit --coverage-clover ./clover.xml | ||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml | ||
|
||
- stage: Metrics and quality | ||
env: CODE_STANDARD | ||
script: | ||
- ./vendor/bin/phpcs | ||
|
||
- stage: Metrics and quality | ||
env: MUTATION | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi | ||
script: | ||
- ./vendor/bin/infection -s --threads=4 --min-msi=100 --min-covered-msi=100 | ||
|
||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- if [ -f clover.xml ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi | ||
- stage: Metrics and quality | ||
env: STATIC_ANALYSIS | ||
script: | ||
- ./vendor/bin/phpstan analyse |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"timeout": 3, | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"logs": { | ||
"text": "infection-log.txt" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<ruleset | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd" | ||
> | ||
<arg name="basepath" value="." /> | ||
<arg name="extensions" value="php" /> | ||
<arg name="parallel" value="80" /> | ||
<arg name="colors" /> | ||
<arg name="cache" value=".phpcs.cache" /> | ||
<arg value="p" /> | ||
|
||
<rule ref="Lcobucci"/> | ||
|
||
<file>src</file> | ||
<file>test</file> | ||
</ruleset> |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon | ||
- vendor/phpstan/phpstan-deprecation-rules/rules.neon | ||
|
||
parameters: | ||
level: 7 | ||
paths: | ||
- src | ||
- test |
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,5 +1,4 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\Clock; | ||
|
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,5 +1,4 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\Clock; | ||
|
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
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,5 +1,4 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\Clock; | ||
|