Skip to content

Commit e7ca7dc

Browse files
committed
chore(scrutinizer): config scrutinizer, code climate does not work
1 parent 2b4db24 commit e7ca7dc

File tree

3 files changed

+110
-9
lines changed

3 files changed

+110
-9
lines changed

.scrutinizer.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
build:
2+
environment:
3+
mysql: false
4+
redis: false
5+
postgresql: false
6+
php:
7+
version: 7.1
8+
tools:
9+
external_code_coverage:
10+
timeout: 300
11+
php_sim: true
12+
php_pdepend: true
13+
php_analyzer: true
14+
php_changetracking: true
15+
php_code_sniffer:
16+
enabled: true
17+
filter:
18+
paths: ["src", "tests"]
19+
config:
20+
standard: PSR2
21+
php_mess_detector:
22+
enabled: true
23+
filter:
24+
paths: ["src", "tests"]
25+
config:
26+
code_size_rules:
27+
cyclomatic_complexity: true
28+
npath_complexity: true
29+
excessive_method_length: true
30+
excessive_class_length: true
31+
excessive_parameter_list: true
32+
excessive_public_count: true
33+
too_many_fields: true
34+
too_many_methods: true
35+
excessive_class_complexity: true
36+
design_rules:
37+
exit_expression: true
38+
eval_expression: true
39+
goto_statement: true
40+
number_of_class_children: true
41+
depth_of_inheritance: true
42+
coupling_between_objects: true
43+
unused_code_rules:
44+
unused_private_field: true
45+
unused_local_variable: true
46+
unused_private_method: true
47+
unused_formal_parameter: true
48+
naming_rules:
49+
short_variable:
50+
minimum: 2
51+
constructor_conflict: true
52+
constant_naming: true
53+
boolean_method_name: true
54+
controversial_rules:
55+
superglobals: true
56+
camel_case_class_name: true
57+
camel_case_property_name: true
58+
camel_case_method_name: true
59+
camel_case_parameter_name: true
60+
camel_case_variable_name: true
61+
checks:
62+
php:
63+
argument_type_checks: true
64+
assignment_of_null_return: true
65+
avoid_conflicting_incrementers: true
66+
avoid_useless_overridden_methods: true
67+
catch_class_exists: true
68+
closure_use_modifiable: true
69+
closure_use_not_conflicting: true
70+
code_rating: true
71+
deprecated_code_usage: true
72+
duplication: true
73+
method_calls_on_non_object: true
74+
missing_arguments: true
75+
no_duplicate_arguments: true
76+
no_non_implemented_abstract_methods: true
77+
no_property_on_interface: true
78+
parameter_non_unique: true
79+
precedence_in_conditions: true
80+
precedence_mistakes: true
81+
require_php_tag_first: true
82+
security_vulnerabilities: true
83+
sql_injection_vulnerabilities: true
84+
too_many_arguments: true
85+
unreachable_code: true
86+
unused_methods: true
87+
unused_parameters: true
88+
unused_properties: true
89+
unused_variables: true
90+
use_statement_alias_conflict: true
91+
useless_calls: true
92+
variable_existence: true
93+
verify_access_scope_valid: true
94+
verify_argument_usable_as_reference: true
95+
verify_property_names: true
96+
97+
filter:
98+
excluded_paths:
99+
- tests/*

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: php
2+
sudo: false
23

34
env:
45
global:
5-
- CC_TEST_REPORTER_ID=86a09970f02b3f841b263963099a65adf9bf9e85ea72db88a1d5f5ac003d01f2
66
- 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)
77

88
php:
@@ -12,20 +12,21 @@ php:
1212
- hhvm
1313

1414
matrix:
15+
fast_finish: true
1516
allow_failures:
1617
- php: nightly
1718
- php: hhvm
1819

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

2423
install:
24+
- composer self-update
2525
- composer install --dev --prefer-dist -o
2626

2727
script:
28-
- ./vendor/bin/phpunit --coverage-clover clover.xml
28+
- ./vendor/bin/phpunit $PHPUNIT_FLAGS
2929

3030
after_script:
31-
- 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
31+
- wget https://scrutinizer-ci.com/ocular.phar
32+
- if [ -f clover.xml ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ Celesc
22
======
33

44
[![Build Status](https://travis-ci.org/mrprompt/Celesc.svg?branch=master)](https://travis-ci.org/mrprompt/Celesc)
5-
[![Code Climate](https://codeclimate.com/github/mrprompt/Celesc/badges/gpa.svg)](https://codeclimate.com/github/mrprompt/Celesc)
6-
[![Test Coverage](https://codeclimate.com/github/mrprompt/Celesc/badges/coverage.svg)](https://codeclimate.com/github/mrprompt/Celesc/coverage)
7-
[![Issue Count](https://codeclimate.com/github/mrprompt/Celesc/badges/issue_count.svg)](https://codeclimate.com/github/mrprompt/Celesc)
5+
[![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)
6+
[![Code Coverage](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mrprompt/Celesc/?branch=master)
7+
[![Build Status](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mrprompt/Celesc/build-status/master)
8+
[![Code Intelligence Status](https://scrutinizer-ci.com/g/mrprompt/Celesc/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)
89

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

0 commit comments

Comments
 (0)