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

usability: do not print usage on error #1186

Closed
glensc opened this issue Oct 4, 2016 · 4 comments
Closed

usability: do not print usage on error #1186

glensc opened this issue Oct 4, 2016 · 4 comments

Comments

@glensc
Copy link
Contributor

glensc commented Oct 4, 2016

stop printing usage on error.

it's really annoying to see error in case of command line usage error because usage print occupies whole screen.

$ phpcs -v --standard=PHPCompatibility --runtime-set testVersion 5.3-7.0 --exclude=PHPCompatibility.Sniffs.PHP.ForbiddenNamesAsInvokedFunctionsSniff cs70-int.php

image

i have to scroll back two screens of text to see the actual error:

image

@aik099
Copy link
Contributor

aik099 commented Oct 4, 2016

Any solution you have in mind? Maybe:

  • either showing error after usage information
  • or showing type "phpcs --help" to see available command line options

@glensc
Copy link
Contributor Author

glensc commented Oct 4, 2016

yes, the second option, just do not print usage if it was not requested. it breaks concentration to see the actual error.

@gsherwood
Copy link
Member

Yeah, it's getting a bit long. Might be worth changing in the 3.0 version.

@gsherwood
Copy link
Member

This change has been committed to the 3.0 branch. Output now looks like this:

$ phpcs temp.php --sniffs=NotAValidSniff
ERROR: The specified sniff code "NotAValidSniff" is invalid

Run "phpcs --help" for usage information

Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants