
from SublimeLinter.lint import Linter, util
import platform


class Iverilog (Linter):
    syntax = ('verilog')
    cmd = 'iverilog -t null'
    tempfile_suffix = 'verilog'
    # We are missing out on some errors by ignoring multiline messages.

    if platform.system() == 'Windows':
        regex = (
            r'^([^:]+):.*:(?P<line>\d*):'
            r'.((?P<error>error)|(?P<warning>warning))?'
            r'(?P<message>.*)'
        )
    else:
        regex = (
            r'^([^:]+):(?P<line>\d+): '
            r'(?:(?P<error>error)|(?P<warning>warning): )?'
            r'(?P<message>.+)'
        )

    error_stream = util.STREAM_BOTH


import sublime, sublime_plugin
from SublimeLinter.lint import Linter, util


class Iverilog (Linter):
    syntax = ('verilog')
    cmd = 'iverilog -t null'
    tempfile_suffix = 'verilog'
    # We are missing out on some errors by ignoring multiline messages.

    if sublime.platform() == 'windows':
        regex = (
            r'^([^:]+):.*:(?P<line>\d*):'
            r'.((?P<error>error)|(?P<warning>warning))?'
            r'(?P<message>.*)'
        )
    else:
        regex = (
            r'^([^:]+):(?P<line>\d+): '
            r'(?:(?P<error>error)|(?P<warning>warning): )?'
            r'(?P<message>.+)'
        )

    error_stream = util.STREAM_BOTH

Use the platform() in sublime.py rather than importing platform.
Use the platform() in sublime.py rather than importing platform.

  
+ import sublime, sublime_plugin
  from SublimeLinter.lint import Linter, util
- import platform
  
  
  class Iverilog (Linter):
      syntax = ('verilog')
      cmd = 'iverilog -t null'
      tempfile_suffix = 'verilog'
      # We are missing out on some errors by ignoring multiline messages.
  
-     if platform.system() == 'Windows':
+     if sublime.platform() == 'windows':
          regex = (
              r'^([^:]+):.*:(?P<line>\d*):'
              r'.((?P<error>error)|(?P<warning>warning))?'
              r'(?P<message>.*)'
          )
      else:
          regex = (
              r'^([^:]+):(?P<line>\d+): '
              r'(?:(?P<error>error)|(?P<warning>warning): )?'
              r'(?P<message>.+)'
          )
  
      error_stream = util.STREAM_BOTH
  
Use the platform() in sublime.py rather than importing platform.
## Code Before:

from SublimeLinter.lint import Linter, util
import platform


class Iverilog (Linter):
    syntax = ('verilog')
    cmd = 'iverilog -t null'
    tempfile_suffix = 'verilog'
    # We are missing out on some errors by ignoring multiline messages.

    if platform.system() == 'Windows':
        regex = (
            r'^([^:]+):.*:(?P<line>\d*):'
            r'.((?P<error>error)|(?P<warning>warning))?'
            r'(?P<message>.*)'
        )
    else:
        regex = (
            r'^([^:]+):(?P<line>\d+): '
            r'(?:(?P<error>error)|(?P<warning>warning): )?'
            r'(?P<message>.+)'
        )

    error_stream = util.STREAM_BOTH

## Instruction:
Use the platform() in sublime.py rather than importing platform.
## Code After:

import sublime, sublime_plugin
from SublimeLinter.lint import Linter, util


class Iverilog (Linter):
    syntax = ('verilog')
    cmd = 'iverilog -t null'
    tempfile_suffix = 'verilog'
    # We are missing out on some errors by ignoring multiline messages.

    if sublime.platform() == 'windows':
        regex = (
            r'^([^:]+):.*:(?P<line>\d*):'
            r'.((?P<error>error)|(?P<warning>warning))?'
            r'(?P<message>.*)'
        )
    else:
        regex = (
            r'^([^:]+):(?P<line>\d+): '
            r'(?:(?P<error>error)|(?P<warning>warning): )?'
            r'(?P<message>.+)'
        )

    error_stream = util.STREAM_BOTH
