Skip to content

Commit

Permalink
WARNING was moved in SL4
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Feb 5, 2018
1 parent 1cdaa3d commit ae30705
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@

"""This module exports the Phpmd plugin class."""

from SublimeLinter.lint import highlight, Linter
import SublimeLinter
from SublimeLinter.lint import Linter

if getattr(SublimeLinter.lint, 'VERSION', 3) > 3:
from SublimeLinter.lint import const
WARNING = const.WARNING
else:
from SublimeLinter.lint import highlight
WARNING = highlight.WARNING


class Phpmd(Linter):
Expand All @@ -23,7 +31,7 @@ class Phpmd(Linter):
r'(?P<filename>.+):(?P<line>\d+)'
r'\s*(?P<message>.+)$'
)
default_type = highlight.WARNING
default_type = WARNING
tempfile_suffix = 'php'
defaults = {
'@rulesets:,': 'cleancode,codesize,controversial,design,naming,unusedcode'
Expand Down

0 comments on commit ae30705

Please sign in to comment.