Page MenuHomePhabricator

Fix JSCS's severity/severity.rules support
Open, Needs TriagePublic

Description

Currently JSCS has severity.rules partially disabled by not calling getLintMessageSeverity and not implementing getDefaultMessageSeverity. I can't really use JSCS with Phabricator without that working because each line that is an "ERROR" makes the linting fail (even though those lines were not touched). The severity.rules functionality would be great for this reason.

The severity.rules isn't explicitly disabled (via canCustomizeLintSeverities) but there is a comment regarding it being unable to detect the rule that gets returned that is true. Unfortunately, this means the inability to do the following:

{
  "jscs": {
    "type": "jscs",
    "severity": {
      "JSCS.E": "warning"
    }
  }
}

I believe I have a good patch to correct this issue by changing the codes to "JSCS.E, JSCS.W, JSCS.A" and calling getLintMessageSeverity. That being said, this is still not going to be able to fix changing severities based on the individual rules.