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

from SublimeLinter.lint import Linter


class Hlint(Linter):
    """Provides an interface to hlint."""

    syntax = ('haskell', 'haskell-sublimehaskell', 'literate haskell')
    cmd = 'hlint'
    regex = (
        r'^.+:(?P<line>\d+):'
        '(?P<col>\d+):\s*'
        '(?:(?P<error>Error)|(?P<warning>Warning)):\s*'
        '(?P<message>.+)$'
    )
    multiline = True
    tempfile_suffix = {
        'haskell': 'hs',
        'haskell-sublimehaskell': 'hs',
        'literate haskell': 'lhs'
    }


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

from SublimeLinter.lint import Linter


class Hlint(Linter):
    """Provides an interface to hlint."""

    defaults = {
        'selector': 'source.haskell'
    }
    cmd = 'hlint'
    regex = (
        r'^.+:(?P<line>\d+):'
        '(?P<col>\d+):\s*'
        '(?:(?P<error>Error)|(?P<warning>Warning)):\s*'
        '(?P<message>.+)$'
    )
    multiline = True
    tempfile_suffix = 'hs'

Update to new `defaults` configuration
Update to new `defaults` configuration

  
  """This module exports the Hlint plugin class."""
  
  from SublimeLinter.lint import Linter
  
  
  class Hlint(Linter):
      """Provides an interface to hlint."""
  
-     syntax = ('haskell', 'haskell-sublimehaskell', 'literate haskell')
+     defaults = {
+         'selector': 'source.haskell'
+     }
      cmd = 'hlint'
      regex = (
          r'^.+:(?P<line>\d+):'
          '(?P<col>\d+):\s*'
          '(?:(?P<error>Error)|(?P<warning>Warning)):\s*'
          '(?P<message>.+)$'
      )
      multiline = True
-     tempfile_suffix = {
+     tempfile_suffix = 'hs'
-         'haskell': 'hs',
-         'haskell-sublimehaskell': 'hs',
-         'literate haskell': 'lhs'
-     }
  
Update to new `defaults` configuration
## Code Before:

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

from SublimeLinter.lint import Linter


class Hlint(Linter):
    """Provides an interface to hlint."""

    syntax = ('haskell', 'haskell-sublimehaskell', 'literate haskell')
    cmd = 'hlint'
    regex = (
        r'^.+:(?P<line>\d+):'
        '(?P<col>\d+):\s*'
        '(?:(?P<error>Error)|(?P<warning>Warning)):\s*'
        '(?P<message>.+)$'
    )
    multiline = True
    tempfile_suffix = {
        'haskell': 'hs',
        'haskell-sublimehaskell': 'hs',
        'literate haskell': 'lhs'
    }

## Instruction:
Update to new `defaults` configuration
## Code After:

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

from SublimeLinter.lint import Linter


class Hlint(Linter):
    """Provides an interface to hlint."""

    defaults = {
        'selector': 'source.haskell'
    }
    cmd = 'hlint'
    regex = (
        r'^.+:(?P<line>\d+):'
        '(?P<col>\d+):\s*'
        '(?:(?P<error>Error)|(?P<warning>Warning)):\s*'
        '(?P<message>.+)$'
    )
    multiline = True
    tempfile_suffix = 'hs'
