Code Monkey home page Code Monkey logo

vscode-salt-lint's Introduction

salt-lint extension for Visual Studio Code

Version Install Count Rating

This extension integrates salt-lint into VScode

Requirements

  1. Ensure salt-lint is installed (v0.1.0 or newer).
  2. Run Install Extension command from Command Palette.
  3. Search and choose salt-lint.

Options

There are various options that can be configured by making changes to your user or workspace preferences.

Default options are:

{
    "salt-lint.enable": true,
    "salt-lint.run": "onType",
    "salt-lint.executablePath": "salt-lint"
}

Lint onType or onSave

By default the linter will lint as you type. Alternatively, set salt-lint.run to onSave if you want to lint only when the file is saved (works best if auto-save is on).

{
    "salt-lint.run": "onType" // also: "onSave"
}

Acknowledgements

This extension is based on timonwong's ShellCheck Linter.

vscode-salt-lint's People

Contributors

jbouter avatar roaldnefs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

roaldnefs

vscode-salt-lint's Issues

Vscode salt-lint 0.0.5 doesn't work with salt-lint 0.5.2 (or > 0.4.2)

Environment :

  • Windows 10
  • VS code : 1.5.4.2
  • VScode salt-lint : 0.0.5 (default conf)
  • salt-lint : 0.5.2 (installed from python 3.8.0)

With this configuration nothing is displayed in my sls file under VSC.
Command line is OK

I have a working configuration only with salt-lint 0.4.2 (all versions > 0.4.2 doesn't work).

Thank you

DeprecationWarning: Buffer() is deprecated due to security and usability issues

While installing warpnet.salt-lint from the command using code --install-extension warpnet.salt-lint the following error is shown:

(node:3733) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

`salt-lint` program not found when starting VScode

Hi,

I am facing an issues on VScode on Windows, that salt-lint is not found after start. Full error:

Cannot salt-lint the Salt State file. The salt-lint program was not found.

It is strange, because integrated VScode terminal can use salt-lint Python binary and use linter on file using cli, it can also be called directly from Windows Terminal. I see this error only when running this extenstion. BTW VScode is not running under Administrator and I have path to Python scripts added to ENV variables. Could you help me what need to be checked? Thanks.

Open VSX Listing: Signing the Publisher Agreement

Thank you for being part of the Open VSX community by adding your extensions to the Open VSX Registry. Please note that the service was recently transferred to the Eclipse Foundation and urgent action on your part is needed so we can continue to list your extensions. To ensure uninterrupted service, please sign the Eclipse Publisher Agreement on or before January 8, 2021. If not signed by that date, your extensions will be delisted and will no longer appear on the site nor be available via the API. If you sign at a later date, your extensions will then be re-activated. The signing process is explained in the Wiki (steps 1 and 2).

Please also note that all extensions MUST have a license in order to be listed.

More details are in these recent blog posts:
https://blogs.eclipse.org/post/brian-king/open-vsx-registry-under-new-management
https://blogs.eclipse.org/post/brian-king/new-era-open-vsx-registry

Today, there’s growing momentum around open source tools and technologies that support Visual Studio (VS) Code extensions. Leading global organizations are adopting these tools and technologies. This momentum has spurred demand for a marketplace without restrictions and limitations. Thanks for joining us on this journey as we continue to build the Open VSX community. We look forward to continued innovation from you in 2021!

Include a link to salt-lint

I did eventually locate salt-lint, but it would have been very helpful to have a link to it directly in the README.

Error: command 'salt-lint.runLint' not found

Hello Warpnet!
I installed salt-lint as described, using pip3. It works fine on the CLI, but this extension gives command 'salt-lint.runLint' not found every time I try to run it from the "Command Palette".

Any clues on how to fix or debug this issue?

Feature request: Ignore specific lint recommendations globally

image

Feature request to provide a mechanism to ignore specific lint recommendations globally instead of per line. For the example above, it is desirable to ignore this, however the only mechanism is to comment "# noqa: xxx" on that specific line:

/tmp/testfile:
  file.managed:
    - source: salt://{{unspaced_var}}/example  # noqa: 207

Update version on Open VSX

The version on open-vsx.org isn't up to date. I know I would appreciate it if you were to update it for those using vscodium.

Show salt-lint Wiki for rule Quickfix action does not appear to work

Relevant code:

const title = `Show salt-lint Wiki for ${ruleId}`;
const action = new vscode.CodeAction(title, vscode.CodeActionKind.QuickFix);

On my system, with both saltstack and salt-lint installed, I get syntax highlighting and lint information. However, it seems that there is an intent to provide links to the wiki in the extension code, which does not pop up at all.

image

image

I stumbled onto this while trying to research how quickfix actions work and if it would be possible for me to start implementing some for basic things like salt-lint(207) and salt-lint(208). On that note, if you have any information that might be a good starting point I would love some pointers!!

Edit: I see this seems to be the spec for quickfix actions: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.