2

I am using PHPStorm 9.

I have installed PHPCS to sniff my code. It is properly configured, up and running.

I am working on a very old project, which was implemented in plain PHP, and not using any code standard.

As a result, every time I open any of those files, I get a message at the top of the screen saying that I have too many errors (code style errors).

I have a couple of problems with that.

  1. First, I already know how bad the code is, so I don't need PHP Storm to tell me that all the time.
  2. Second. That message appears and disappears every time I edit the code. As a result, the window editor is constantly moving up and down, which I find specially annoying.

Also, at the top of the screen it is showing me the breadcrumbs, to tell me where I am. I appreciate the help, but I don't actually need it.

So the question is, how can I configure the IDE to disable those two messages? (read arrow and orange arrow in the attached image).

Please notice that I don't want to disable PHPCS. I only want to turn off those annoying messages.

I was unable to find it out by myself because I don't even know how those messages are called. Certainly not 'popups', nor 'status bar'

Best regards

Nicolas

PHPStorm 9 snapshot

2 Answers 2

2

Answering my own questions, thanks to the help of the PHPStorm Support team, Vladimir Luchansky (perhaps you need to create an account to see the thread):

  1. To disable breadcrumbs: Go to File->Settings->Editor->General->Appearance, and untick the option Show HTML Breadcrumbs. Then restart the IDE
  2. To disable the PHPCS messages without disabling PHPCS itself: Well, that option is not available in PHPStorm 9. It will be available for a future release. According to Vladimir, a developer is working on it. In order to make this request to go up in the future request list, the request needs to get as much 'votes' as possible. So, if you are interested in this feature to be ready ASAP, please vote up here.

Best,

Nicolas

0

I don't believe there's any mechanism for suppressing those phpcs: Too many messages per file alerts. As an alternative solution, you could give this work-around a try:

Clone your current inspection profile via Preferences > Editor > Inspections. Name the new one "Strict (with phpcs)". Then, choose your old inspection profile from the Profile: dropdown box (thus, reverting your project's default inspection profile to your old one). Rename it to "Weak (without phpcs)" and disable phpcs for that particular profile by unchecking the PHP > PHP Code Sniffer validation option.

From this point forward, phpcs inspections (and related alerts, like the one you're concerned about) won't come into play as you're editing your files. However, whenever you do want to inspect one of your files using PHP Code Sniffer, you can do so easily via Code > Inspect Code > Inspection Profile > Strict (with phpcs)

Hope this helps!

3
  • Thanks Nate B, but unfortunately that workaround disables the PHPCS, which I don't want to.
    – Nicolas
    Dec 11, 2015 at 18:20
  • 1
    K, I figured it was worth a shot. I'll be interested to see if there's actually a way to accomplish your original goal!
    – Nate
    Dec 11, 2015 at 18:26
  • 1
    No worries. I also posted the same question to the PHP Storm Support team (I have a licence), so whichever solution they may propose, I will post it here. Regards
    – Nicolas
    Dec 11, 2015 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.