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

CommaAfterArrayItem: add metrics for comma after last item #1842

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 6, 2019

Add metrics to make it easier for people to decide whether or not to en/disable this rule.

The generated metrics will look like this and can be called up using --report=info:

PHP CODE SNIFFER INFORMATION REPORT
----------------------------------------------------------------------
Multi-line array - comma after last item:
	no    => 2,064 ( 95.82%)
	yes   =>    90 (  4.18%)
	-------------------------
	total => 2,154 (100.00%)

Single line array - comma after last item: 0 [804/804, 100%]

Add metrics to make it easier for people to decide whether or not to en/disable this rule.

The generated metrics will look like this and can be called up using `--report=info`:
```
PHP CODE SNIFFER INFORMATION REPORT
----------------------------------------------------------------------
Multi-line array - comma after last item:
	no    => 2,064 ( 95.82%)
	yes   =>    90 (  4.18%)
	-------------------------
	total => 2,154 (100.00%)

Single line array - comma after last item: 0 [804/804, 100%]
```
@jrfnl jrfnl force-pushed the feature/commaafterarrayitem-add-metrics branch from 4f3798d to 35fd3b6 Compare December 6, 2019 06:03
@dingo-d dingo-d merged commit 38b6211 into develop Dec 6, 2019
@dingo-d dingo-d deleted the feature/commaafterarrayitem-add-metrics branch December 6, 2019 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants