Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support phpmetrics v1 configuration #78

Merged
merged 2 commits into from
Jun 25, 2017
Merged

Conversation

zdenekdrahos
Copy link
Member

Closes #74

  • load config from .phpqa.yml
  • evalute exit code (1 when failureCondition is met)

@zdenekdrahos
Copy link
Member Author

@cbastienbaron: could you try this version? thanks

composer update edgedesign/phpqa:dev-phpmetrics-config

@cbastienbaron
Copy link
Contributor

@zdenekdrahos seems has no effect

#.phpqa.yml
phpmetrics:
    config: .phpmetrics.yml

#.phpmetrics.yml
default:
    rules:
        cyclomaticComplexity: [ 10, 6, 2 ]
        maintainabilityIndex: [ 0, 75, 95 ]

    failure: average.maintainabilityIndex < 1  or sum.loc > 10
[phpqa] 
+------------+----------------+--------------+--------+------------------------------+
| Tool       | Allowed Errors | Errors count | Is OK? | HTML report                  |
+------------+----------------+--------------+--------+------------------------------+
| phpmetrics |                |              || build//phpmetrics/index.html |
+------------+----------------+--------------+--------+------------------------------+
| phpqa      |                | 0            ||                              |
+------------+----------------+--------------+--------+------------------------------+

[phpqa] No failed tools

Hint: don't know if behaviour is expected but if i put

#.phpqa.yml
phpmetrics:
    config: .noexist.yml

i have no errors / exceptions :)

@zdenekdrahos
Copy link
Member Author

@cbastienbaron: you have to specify 0 in --tools. Take a look at change in bin/ci.sh.

phpqa --tools phpmetrics:0

When allowed errors cell is empty, it means that errors weren't analyzed.

It's optional feature that is by default turned off. You have to define number of allowed errors

@zdenekdrahos zdenekdrahos merged commit 282e039 into master Jun 25, 2017
@zdenekdrahos zdenekdrahos deleted the phpmetrics-config branch June 25, 2017 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants