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

Non-red highlight color or option to customize #36

Closed
paulrrogers opened this issue Feb 14, 2017 · 6 comments
Closed

Non-red highlight color or option to customize #36

paulrrogers opened this issue Feb 14, 2017 · 6 comments

Comments

@paulrrogers
Copy link

It would be helpful if the highlight color were not red since that color is associated with errors. Ideally it could be customized.

@ikappas
Copy link
Owner

ikappas commented Feb 23, 2017

@paulrrogers Thank you for your proposal.

Both VSCode and phpcs executable use red for errors and yellow for warnings.

I don't see value in changing this or providing additional support for something that will rarely be used (if at all).

@ikappas ikappas closed this as completed Feb 23, 2017
@origamifreak2
Copy link

I agree that this would be helpful. If it doesn't make sense to put in a setting, then is there a way to change this with a custom ruleset maybe? Any guidance or directions would be appreciated

@origamifreak2
Copy link

origamifreak2 commented Nov 29, 2018

For those who want to show all warnings differently, I found a hack that will allow you to do it. It's definitely a hack though, so next time the you update the plugin or re-install it, it will overwrite the changes you've made.

Steps

  1. open file ~/.vscode/extensions/ikappas.phpcs-1.0.5/server/src/linter.js

  2. find code that says vscode_languageserver_1.DiagnosticSeverity (this should be followed by .Hint, .Information, .Warning, or .Error)

  3. change the .Hint, .Information, .Warning, or .Error ending to whichever one you want

  4. Restart vscode and the errors from phpcs will be displayed differently

    • .Error = red squiggly
    • .Warning = yellow squiggly
    • .Information = green squiggly
    • .Hint = three dots

@paulrrogers @ikappas

@cagross
Copy link

cagross commented Sep 1, 2019

@origamifreak2 @ikappas this still the best way to change the highlight color of phpcs errors and warnings in VSCode?

I agree that phpcs errors should be styled differently from the built in VSCode errors/warnings (e.g. different color and/or font). The errors reported by phpcs are non-critical, while the errors reported by VSCode can sometimes be critical errors (i.e. something that will result in a PHP fatal error). It would be nice to see a distinction between the two.

@DanAlexson90
Copy link

I agree with @cagross, makes no sense that phpcs red squiggles everything.

@JPustkuchen
Copy link

@ikappas this is really a bad choice and brings the library close to unusable state in daily use. You can't distinguish code errors from code style WARNINGS anymore.

You're right, that ERRORS should be red, but code style, missing comment or whatever is no ERROR. An error is something that leads to broken functionality. Look at all kind of IDE's, I've never seen code style errors being displayed like syntax errors ever before, for good reasons.

This project is really impressive, and you've done a GREAT job, but the decision above should clearly be revised.

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

No branches or pull requests

6 participants