-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Report verbosity of phpcbf #699
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
Comments
phpcbf
Please post current report output and proposed report output. |
@aik099 in my opinion a What I'm trying to say is that it's not always useful to see ten screens of files which were not even affected by the |
Since |
@aik099 |
Sounds like a really good idea, but probably a lot of work as I'd want to support all existing report formats (or all the ones that make sense at least). The current output could be shown when using the |
Been searching for this option but appears it's not something that's settable. The output just lists all the files it processes and in my eyes, you should just see the ones it can/will fix for you. This over and over is annoying to look at when you just want to see a simple output. |
By the time it has figured out if there are fixable errors, the debug output has already been suppressed. So it actually can't do what you are asking. Note that this is exactly the same as the -v option in PHPCS. The difference between PHPCS and PHPCBF is that PHPCBF basically has the -v option hard-coded and it doesn't have any reports. You could certainly turn verbosity off, but I'd need to provide a way for PHPCBF to display the list of files, number of fixes, number of unfixed errors etc in a variety of report formats. |
I've been thinking about this again and I think a full range of reports is just too complex. I'll try and support verbosity, progress information, and print a basic summary report. |
I've pushed a commit that changes the output of PHPCBF. By default, it will just print a summary report about what it did. But you can also ask for progress information and for verbose information (as it did already). The basic usage now starts with running PHPCS and getting some errors:
Then run PHPCBF and get a summary report of the fixes it did:
You can also run PHPCBF with progress output, where
If you want the old output, you can use the I think this is the best I can do for now. You can't pick from a list of reports, but I don't think that is as important for PHPCBF as it it for PHPCS and most people don't automate the fixing using build scripts. All this will be released in 3.0.0a2, or is available on the 3.0 branch now. I had to refactor the way things worked, which was a bit risky for 2.x. |
…y-php-statement Generic/EmptyPHPStatement: improve code coverage
Follow up on squizlabs#699 Commit 529bcba7a42ec35873c31459ae61bee67852e956 removed the unreachable `default` case from the `switch`, but even when it is not explicitly there, this still leaves an unreachable branch in the code flow. This commit takes the previous change one step further and removes the `switch` completely in favour of two separate `private` functions which each handle one specific token. N.B.: this commit will be easier to review while ignoring whitespace changes.
I think that
phpcbf
should have an option to configure it's output verbosity like one thatphpcs
has.For example I usually don't want to see a list of files which were not affected by the
phpcbf
.The text was updated successfully, but these errors were encountered: