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

from SublimeLinter.lint import Linter
import os


class Bashate(Linter):
    """Provides an interface to bashate."""

    cmd = 'bashate'
    comment_re = r'\s*#'
    regex = (
        r'^.+:(?P<line>\d+):1: (?:(?P<error>E)|(?P<warning>W))\d{3} (?P<message>.+)'
    )
    defaults = {
        'selector': 'source.shell.bash',
        '--ignore=,': '',
        '--warn=,': '',
        '--error=,': ''
    }
    tempfile_suffix = 'sh'
    check_version = False

    def tmpfile(self, cmd, code, suffix=''):
        """
        Run an external executable using a temp file to pass code and return its output.

        We override this to have the tmpfile extension match what is being
        linted so E005 is valid.
        """

        filename, extension = os.path.splitext(self.filename)
        extension = '.missingextension' if not extension else extension
        return super().tmpfile(cmd, code, extension)


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

from SublimeLinter.lint import Linter
import os


class Bashate(Linter):
    """Provides an interface to bashate."""

    cmd = 'bashate'
    regex = (
        r'^.+:(?P<line>\d+):1: (?:(?P<error>E)|(?P<warning>W))\d{3} (?P<message>.+)'
    )
    defaults = {
        'selector': 'source.shell.bash',
        '--ignore=,': '',
        '--warn=,': '',
        '--error=,': ''
    }
    tempfile_suffix = 'sh'

    def tmpfile(self, cmd, code, suffix=''):
        """
        Run an external executable using a temp file to pass code and return its output.

        We override this to have the tmpfile extension match what is being
        linted so E005 is valid.
        """

        filename, extension = os.path.splitext(self.filename)
        extension = '.missingextension' if not extension else extension
        return super().tmpfile(cmd, code, extension)

Remove deprecated attributes comment_re and check_version
Remove deprecated attributes comment_re and check_version

  
  """This module exports the Bashate plugin class."""
  
  from SublimeLinter.lint import Linter
  import os
  
  
  class Bashate(Linter):
      """Provides an interface to bashate."""
  
      cmd = 'bashate'
-     comment_re = r'\s*#'
      regex = (
          r'^.+:(?P<line>\d+):1: (?:(?P<error>E)|(?P<warning>W))\d{3} (?P<message>.+)'
      )
      defaults = {
          'selector': 'source.shell.bash',
          '--ignore=,': '',
          '--warn=,': '',
          '--error=,': ''
      }
      tempfile_suffix = 'sh'
-     check_version = False
  
      def tmpfile(self, cmd, code, suffix=''):
          """
          Run an external executable using a temp file to pass code and return its output.
  
          We override this to have the tmpfile extension match what is being
          linted so E005 is valid.
          """
  
          filename, extension = os.path.splitext(self.filename)
          extension = '.missingextension' if not extension else extension
          return super().tmpfile(cmd, code, extension)
  
Remove deprecated attributes comment_re and check_version
## Code Before:

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

from SublimeLinter.lint import Linter
import os


class Bashate(Linter):
    """Provides an interface to bashate."""

    cmd = 'bashate'
    comment_re = r'\s*#'
    regex = (
        r'^.+:(?P<line>\d+):1: (?:(?P<error>E)|(?P<warning>W))\d{3} (?P<message>.+)'
    )
    defaults = {
        'selector': 'source.shell.bash',
        '--ignore=,': '',
        '--warn=,': '',
        '--error=,': ''
    }
    tempfile_suffix = 'sh'
    check_version = False

    def tmpfile(self, cmd, code, suffix=''):
        """
        Run an external executable using a temp file to pass code and return its output.

        We override this to have the tmpfile extension match what is being
        linted so E005 is valid.
        """

        filename, extension = os.path.splitext(self.filename)
        extension = '.missingextension' if not extension else extension
        return super().tmpfile(cmd, code, extension)

## Instruction:
Remove deprecated attributes comment_re and check_version
## Code After:

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

from SublimeLinter.lint import Linter
import os


class Bashate(Linter):
    """Provides an interface to bashate."""

    cmd = 'bashate'
    regex = (
        r'^.+:(?P<line>\d+):1: (?:(?P<error>E)|(?P<warning>W))\d{3} (?P<message>.+)'
    )
    defaults = {
        'selector': 'source.shell.bash',
        '--ignore=,': '',
        '--warn=,': '',
        '--error=,': ''
    }
    tempfile_suffix = 'sh'

    def tmpfile(self, cmd, code, suffix=''):
        """
        Run an external executable using a temp file to pass code and return its output.

        We override this to have the tmpfile extension match what is being
        linted so E005 is valid.
        """

        filename, extension = os.path.splitext(self.filename)
        extension = '.missingextension' if not extension else extension
        return super().tmpfile(cmd, code, extension)
