0
votes

UPDATE (2020/12/03):

This has been fixed in PHP Storm 2020.3


I utilize PHP CodeSniffer and PHP Mess Detector to lint my code in PhpStorm. Until recently, I have been able to create custom severity levels (as shown below) and it will highlight my code accordingly if there is a violation.

What I found is that if I used one of the built in severity levels (e.g. Weak Error, Error, Sever Problem), the inspections and highlighting appear as I would expect, so it is not a problem with the installation of CodeSniffer or Mess Detector.

What I do to replicate the problem

  1. Go under Inspections -> Quality Tools -> PHP_CodeSniffer Validation
  2. Choose "Error" severity (all scopes)
  3. Linting works as configured -- see below.

Picture of CodeSniffer Highlighting Working

  1. Click Edit Severity -> "Edit Severities" and create a custom Profile (e.g. CS Violation)
  2. Set Colors and promote severity level to the top.
  3. Click Apply
  4. Editor now says "No Violations Found" and Syntax highlighting, feedback is missing as show below.

Incorrect CS Validation Behavior with custom Profile.

Question:

Is this a known bug or are there now additional tasks that must be completed in order to use custom severity levels in PhpStorm?

1

1 Answers

2
votes

It's a known issue (if I'm getting your description correctly): https://youtrack.jetbrains.com/issue/WI-52633

Watch that ticket (star/vote/comment) to get notified on any progress.