From d8fa90366e3ee3f8c8b36997e611b188ca5ba74f Mon Sep 17 00:00:00 2001 From: J Rob Gant Date: Tue, 23 Jul 2019 11:12:08 -0400 Subject: [PATCH 1/2] Resolve SublimeLinter depreciations. Document need for Dockerfile syntax --- README.md | 4 ++++ linter.py | 10 +++------- 2 files changed, 7 insertions(+), 7 deletions(-) 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..8ec2927 100644 --- a/linter.py +++ b/linter.py @@ -17,12 +17,7 @@ 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 @@ -38,8 +33,9 @@ class Dockerfilelint(Linter): ) multiline = True error_stream = util.STREAM_STDOUT - selectors = {} - defaults = {} + defaults = { + 'selector': 'source.dockerfile' + } def run(self, cmd, code): output = super().run(cmd, code) From 2e7a4ebbc58903a2b98a9f45f98dbfa65a70650f Mon Sep 17 00:00:00 2001 From: J Rob Gant Date: Wed, 25 Sep 2019 10:09:20 -0400 Subject: [PATCH 2/2] Remove deprecated setting config_file. --- linter.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linter.py b/linter.py index 8ec2927..cfe3279 100644 --- a/linter.py +++ b/linter.py @@ -16,21 +16,19 @@ class Dockerfilelint(Linter): """Provides an interface to dockerfilelint.""" - cmd = 'dockerfilelint --json' - 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 defaults = {