dschaaff / SublimeLinter-puppet-lint

SublimeLinter 3 plugin for Puppet, using puppet-lint.
MIT License
3 stars 2 forks source link

SublimeLinter: ERROR: puppetlint: Defining 'cls.syntax' has no effect anymore. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector instead. #5

Open costultjens opened 5 years ago

costultjens commented 5 years ago

Since this week I noticed an error in the startup of the SublimeText 3. Puppet linter is now disabled cause of this.

Summary output of console:

...
reloading plugin SublimeLinter-contrib-puppet-lint.linter
puppetlint: Defining 'cls.syntax' has been deprecated. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector
reloading plugin SublimeLinter-contrib-puppet.linter
puppet: Defining 'cls.syntax' has been deprecated. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector
...
Package Control: Upgraded SublimeLinter to 4.12.0
...
reloading plugin SublimeLinter-contrib-puppet-lint.linter
SublimeLinter: ERROR: puppetlint: Defining 'cls.syntax' has no effect anymore. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector instead.
SublimeLinter: WARNING: puppetlint: Defining 'cls.executable' has no effect. Please cleanup and remove these settings.
SublimeLinter: ERROR: puppetlint disabled. 'cls.defaults' is mandatory and MUST be a dict.
reloading plugin SublimeLinter-contrib-puppet.linter
SublimeLinter: ERROR: puppet: Defining 'cls.syntax' has no effect anymore. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector instead.
SublimeLinter: ERROR: puppet disabled. 'cls.defaults' is mandatory and MUST be a dict.

Versions used SublimeLinter-contrib-puppet-lint: v1.2.0 SublimeLinter: v4.12.0 Sublime Text: 3.2.1 Build 3207

shuosiw commented 5 years ago

i have the some problem 💔

shuosiw commented 5 years ago

@koeleco i have fixed this problem and create a PR https://github.com/dschaaff/SublimeLinter-puppet-lint/pull/6

Zachu commented 5 years ago

Until this is fixed you can apply the fix locally by Customizing the package.

Steps:

  1. Create directory Packages/SublimeLinter-contrib-puppet-lint under your sublime configuration directory.
  2. Open the installed package Installed Packages/SublimeLinter-contrib-puppet-lint.sublime-package (it's a zip file)
  3. Copy the linter.py file from the zip to the created Packages/SublimeLinter-contrib-puppet-lint
  4. Edit the file with text editor, and apply the fixes provided in the @ShuosiWang's Pull Request https://github.com/dschaaff/SublimeLinter-puppet-lint/pull/6.
    • Replace the syntax = 'puppet' line with:
        defaults = {
            'selector': 'source.puppet'
        } 
  5. Now everything should work :)
costultjens commented 5 years ago

Thank you for the detailed instructie @Zachu, worked like a charm.