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

from SublimeLinter.lint import NodeLinter, util


class Bemlint(NodeLinter):
    """Provides an interface to bemlint."""

    name = 'bemlint'
    cmd = 'bemlint @ ${args}'
    config_file = ('--config', '.bemlint.json')
    regex = (
        r'^.+?: line (?P<line>\d+), col (?P<col>\d+), '
        r'(?:(?P<error>Error)|(?P<warning>Warning)) - '
        r'(?P<message>.+)'
    )
    multiline = False
    line_col_base = (1, 1)
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'bem'

    defaults = {
        'selector': 'text.html',
        '--format': 'compact',
    }

    # the following attributes are marked useless for SL4
    version_args = '--version'
    version_re = r'v(?P<version>\d+\.\d+\.\d+)'
    version_requirement = '>= 1.4.5'


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

from SublimeLinter.lint import NodeLinter, util


class Bemlint(NodeLinter):
    """Provides an interface to bemlint."""

    name = 'bemlint'
    cmd = 'bemlint ${temp_file} ${args}'
    config_file = ('--config', '.bemlint.json')
    regex = (
        r'^.+?: line (?P<line>\d+), col (?P<col>\d+), '
        r'(?:(?P<error>Error)|(?P<warning>Warning)) - '
        r'(?P<message>.+)'
    )
    multiline = False
    line_col_base = (1, 1)
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'bem'

    defaults = {
        'selector': 'text.html',
        '--format': 'compact',
    }

    # the following attributes are marked useless for SL4
    version_args = '--version'
    version_re = r'v(?P<version>\d+\.\d+\.\d+)'
    version_requirement = '>= 1.4.5'

Mark usage of temporary files in `cmd`
Mark usage of temporary files in `cmd`

The marker `@` was ambiguous in SublimeLinter.  Its usage has been deprecated in favor of explicit markers like `$temp_file`.
  
  """This module exports the Bemlint plugin class."""
  
  from SublimeLinter.lint import NodeLinter, util
  
  
  class Bemlint(NodeLinter):
      """Provides an interface to bemlint."""
  
      name = 'bemlint'
-     cmd = 'bemlint @ ${args}'
+     cmd = 'bemlint ${temp_file} ${args}'
      config_file = ('--config', '.bemlint.json')
      regex = (
          r'^.+?: line (?P<line>\d+), col (?P<col>\d+), '
          r'(?:(?P<error>Error)|(?P<warning>Warning)) - '
          r'(?P<message>.+)'
      )
      multiline = False
      line_col_base = (1, 1)
      error_stream = util.STREAM_BOTH
      tempfile_suffix = 'bem'
  
      defaults = {
          'selector': 'text.html',
          '--format': 'compact',
      }
  
      # the following attributes are marked useless for SL4
      version_args = '--version'
      version_re = r'v(?P<version>\d+\.\d+\.\d+)'
      version_requirement = '>= 1.4.5'
  
Mark usage of temporary files in `cmd`
## Code Before:

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

from SublimeLinter.lint import NodeLinter, util


class Bemlint(NodeLinter):
    """Provides an interface to bemlint."""

    name = 'bemlint'
    cmd = 'bemlint @ ${args}'
    config_file = ('--config', '.bemlint.json')
    regex = (
        r'^.+?: line (?P<line>\d+), col (?P<col>\d+), '
        r'(?:(?P<error>Error)|(?P<warning>Warning)) - '
        r'(?P<message>.+)'
    )
    multiline = False
    line_col_base = (1, 1)
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'bem'

    defaults = {
        'selector': 'text.html',
        '--format': 'compact',
    }

    # the following attributes are marked useless for SL4
    version_args = '--version'
    version_re = r'v(?P<version>\d+\.\d+\.\d+)'
    version_requirement = '>= 1.4.5'

## Instruction:
Mark usage of temporary files in `cmd`
## Code After:

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

from SublimeLinter.lint import NodeLinter, util


class Bemlint(NodeLinter):
    """Provides an interface to bemlint."""

    name = 'bemlint'
    cmd = 'bemlint ${temp_file} ${args}'
    config_file = ('--config', '.bemlint.json')
    regex = (
        r'^.+?: line (?P<line>\d+), col (?P<col>\d+), '
        r'(?:(?P<error>Error)|(?P<warning>Warning)) - '
        r'(?P<message>.+)'
    )
    multiline = False
    line_col_base = (1, 1)
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'bem'

    defaults = {
        'selector': 'text.html',
        '--format': 'compact',
    }

    # the following attributes are marked useless for SL4
    version_args = '--version'
    version_re = r'v(?P<version>\d+\.\d+\.\d+)'
    version_requirement = '>= 1.4.5'
