Skip to content

Commit

Permalink
chore(scrutinizer): config scrutinizer, code climate does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
mrprompt committed Nov 9, 2018
1 parent 2b4db24 commit e7ca7dc
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 9 deletions.
99 changes: 99 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
build:
environment:
mysql: false
redis: false
postgresql: false
php:
version: 7.1
tools:
external_code_coverage:
timeout: 300
php_sim: true
php_pdepend: true
php_analyzer: true
php_changetracking: true
php_code_sniffer:
enabled: true
filter:
paths: ["src", "tests"]
config:
standard: PSR2
php_mess_detector:
enabled: true
filter:
paths: ["src", "tests"]
config:
code_size_rules:
cyclomatic_complexity: true
npath_complexity: true
excessive_method_length: true
excessive_class_length: true
excessive_parameter_list: true
excessive_public_count: true
too_many_fields: true
too_many_methods: true
excessive_class_complexity: true
design_rules:
exit_expression: true
eval_expression: true
goto_statement: true
number_of_class_children: true
depth_of_inheritance: true
coupling_between_objects: true
unused_code_rules:
unused_private_field: true
unused_local_variable: true
unused_private_method: true
unused_formal_parameter: true
naming_rules:
short_variable:
minimum: 2
constructor_conflict: true
constant_naming: true
boolean_method_name: true
controversial_rules:
superglobals: true
camel_case_class_name: true
camel_case_property_name: true
camel_case_method_name: true
camel_case_parameter_name: true
camel_case_variable_name: true
checks:
php:
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
code_rating: true
deprecated_code_usage: true
duplication: 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:
- tests/*
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: php
sudo: false

env:
global:
- CC_TEST_REPORTER_ID=86a09970f02b3f841b263963099a65adf9bf9e85ea72db88a1d5f5ac003d01f2
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)

php:
Expand All @@ -12,20 +12,21 @@ php:
- hhvm

matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- if [ $(phpenv version-name) = "7.1" ]; then ./cc-test-reporter before-build; fi
- if [[ $TRAVIS_PHP_VERSION = '7.1' ]]; then PHPUNIT_FLAGS="--coverage-clover ./clover.xml"; else PHPUNIT_FLAGS=""; fi

install:
- composer self-update
- composer install --dev --prefer-dist -o

script:
- ./vendor/bin/phpunit --coverage-clover clover.xml
- ./vendor/bin/phpunit $PHPUNIT_FLAGS

after_script:
- if [ $(phpenv version-name) = "7.1" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT; fi
- wget https://scrutinizer-ci.com/ocular.phar
- if [ -f clover.xml ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ Celesc
======

[![Build Status](https://travis-ci.org/mrprompt/Celesc.svg?branch=master)](https://travis-ci.org/mrprompt/Celesc)
[![Code Climate](https://codeclimate.com/github/mrprompt/Celesc/badges/gpa.svg)](https://codeclimate.com/github/mrprompt/Celesc)
[![Test Coverage](https://codeclimate.com/github/mrprompt/Celesc/badges/coverage.svg)](https://codeclimate.com/github/mrprompt/Celesc/coverage)
[![Issue Count](https://codeclimate.com/github/mrprompt/Celesc/badges/issue_count.svg)](https://codeclimate.com/github/mrprompt/Celesc)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mrprompt/Celesc/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mrprompt/Celesc/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mrprompt/Celesc/build-status/master)
[![Code Intelligence Status](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)

Biblioteca de integração com a Celesc por meio de troca de arquivos.

Expand Down

0 comments on commit e7ca7dc

Please sign in to comment.