linter.py 905 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # linter.py
  3. # Linter for SublimeLinter3, a code checking framework for Sublime Text 3
  4. #
  5. # Written by VHDL-Tool
  6. # Copyright (c) 2016 VHDL-Tool
  7. #
  8. # License: MIT
  9. #
  10. """This module exports the VhdlTool plugin class."""
  11. from SublimeLinter.lint import Linter, util
  12. class VhdlTool(Linter):
  13. """Provides an interface to vhdl-tool."""
  14. syntax = 'vhdl'
  15. cmd = 'vhdl-tool client lint --compact --stdin -f @'
  16. executable = None
  17. version_args = '--version'
  18. version_re = r'(?P<version>\d+\.\d+\.\d+)'
  19. version_requirement = '>= 0.0'
  20. regex = (
  21. r'^.+?:(?P<line>\d+):(?P<col>\d+):'
  22. r'(?:(?P<error>[e])|(?P<warning>[w])):'
  23. r'(?P<message>.+)'
  24. )
  25. multiline = False
  26. line_col_base = (1, 1)
  27. error_stream = util.STREAM_BOTH
  28. selectors = {}
  29. word_re = None
  30. defaults = {}
  31. inline_settings = None
  32. inline_overrides = None
  33. comment_re = None