-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add printing total count when rubocop --format offences
#793
Conversation
Though I'm on the fence about this, originally the offence count formatter was intended to be used together with another formatter like: # Use both progress formatter (the default) and offence count formatter
$ rubocop -fp -fo
# ...
spec/unit/presenter_spec.rb:116:61: C: Place the . on the next line, together with the method name.
expect(StringUtils).to have_received(:wrap_with_sgr).
^
21 files inspected, 73 offences detected
32 DotPosition
17 SingleLineMethods
15 EmptyLineBetweenDefs
2 LineLength
2 TrailingComma
2 AlignParameters
2 MethodLength
1 CyclomaticComplexity |
@yujinakayama I guess you should extend the documentation on formatter, since outside of you, me and @jonas054 most people probably don't know they can chain formatters. |
@bbatsov Sure. In fact it's described in the text of By the way, after my first reaction, I tend to agree this change now. It would be useful if the formatter can be used alone also, and I don't think it's too verbose even if it's combined with another formatter: 21 files inspected, 73 offences detected
32 DotPosition
17 SingleLineMethods
15 EmptyLineBetweenDefs
2 LineLength
2 TrailingComma
2 AlignParameters
2 MethodLength
1 CyclomaticComplexity
--
73 Total |
@yujinakayama OK. @ma2gedev Update the changelog and squash all commits into one. |
Thanks for explain background about offence count formatter, I understood it. |
I squashed all commits with the changelog. |
@@ -4,6 +4,7 @@ | |||
|
|||
### Bugs fixed | |||
|
|||
* [#793](https://github.com/bbatsov/rubocop/issues/793): Add printing total count when `rubocop --format offences`. ([@ma2gedev][]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be in a section "Changes". You should also add your github handle to the bottom of the changelog.
The README and the relevant spec should also be updated. |
- BEFORE 1 Proc 1 WordArray - AFTER 1 Proc 1 WordArray -- 2 Total
Thanks for mentoring me. I updated the changelog, spec and README. |
Add printing total count when `rubocop --format offences`
@ma2gedev You're welcome. Thanks for your contribution! |
@bbatsov Thanks! |
I would like to know total count when
rubocop --format offences
so print total offence counts.BEFORE
AFTER