diff --git a/README.md b/README.md index 94779fc..8fe91d5 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Before installing this plugin, you must ensure that `dockerfilelint` is installe **Note:** This plugin requires `dockerfilelint` 1.4.0 or later. +You must also install the Dockerfile syntax definitions available for Sublime Text under package control. Search for Dockerfile Syntax Highlighting. + +https://packagecontrol.io/packages/Dockerfile%20Syntax%20Highlighting + ### Linter configuration In order for `dockerfilelint` to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. Before going any further, please read and follow the steps in [“Finding a linter executable”](http://sublimelinter.readthedocs.org/en/latest/troubleshooting.html#finding-a-linter-executable) through [“Validating your PATH”](http://www.sublimelinter.com/en/latest/troubleshooting.html#validating-your-path) in the documentation. diff --git a/linter.py b/linter.py index 4ea56ae..cfe3279 100644 --- a/linter.py +++ b/linter.py @@ -16,30 +16,24 @@ class Dockerfilelint(Linter): """Provides an interface to dockerfilelint.""" - - syntax = 'dockerfile' cmd = 'dockerfilelint --json' - executable = 'dockerfilelint' - version_args = '--version' - version_re = r'(?P\d+\.\d+\.\d+)' - version_requirement = '>= 1.4.0' - config_file = ('.dockerfilelintrc', '~') # The following regex parses text in format :::\n # # Possible Bug & Deprecation marked as errors # # Optimization & Clarity marked as warnings - regex = ( r'^.+?:(?P\d+):' r'(?:(?PPossible Bug|Deprecation|)|(?POptimization|Clarity|)):' r'(?P.+)$\r?\n' ) + multiline = True error_stream = util.STREAM_STDOUT - selectors = {} - defaults = {} + defaults = { + 'selector': 'source.dockerfile' + } def run(self, cmd, code): output = super().run(cmd, code)