-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Support .salt-lint config files #21
Comments
The problem seems to either 1) in the salt-lint or 2) in the way that this plugin is calling salt-lint. This plugin feeds salt-lint the source file through stdout/stdin redirection. This allows the plugin to feed an unsaved file to salt-lint and get the response back. Unfortunately this cases the cd $project/pillar/
cat file.sls | salt-lint It seems that salt-lint ignores the config file when reading the input from stdin, even if the config file is explicitly set like this: cat file.sls | salt-lint -c $PWD/.salt-lint One work-around may be allowing the user to specify CLI arguments to salt-lint and passing in Another work-around might be to write a temporary-file, run salt-lint, and then clean the temporary file up. Regardless, I think starting a discussion with the upstream project is probably worth while |
I think I figured out my issue, anyway. My ---
rules:
204:
# Ignore long lines in pillar/users/init.sls
ignore: init.sls @mattboston - do you use file-specific ignores like this? |
@roaldnefs - if |
Hi @jamesharr 👋🏻 , Thanks for your report! And I'm happy to see you seem to have resolved it already. We currently don't have time to super actively develop both Though, your conclusion is correct in that Sorry for the inconvenience. |
I understand, and I appreciate the work you've done. We're you thinking of supporting file-wide noqa settings in the upstream salt-lint, or doing it entirely in the vscode plugin? My thought was primarily to let the plugin communicate the real name of the file to the CLI tool (and augment salt-lint so it can accept that information). If you have a preferred way of doing this, I can take a stab at a PR in upstream salt-lint as well as this plug-in (though I'm not a typescript person) |
I upgraded to salt-lint v0.9.2, and have the latest vscode plugin, but I still have an issue. Below is my .salt-lint file in the top of my project folder. The main thing that I don't want to see is 204 long lines. The rest of what salt-lint reports is fine
Here's my simplified directory structure. I have a separate vscode project for the salt states and pillar, so the .salt-lint file is in the top of the file structure for each project.
|
When I was reading the For example, when linting
When you run |
It would be nice if the extension could read a .salt-lint config file from the following locations. Preference would be from first to last.
Here's an example of a .salt-lint file: https://github.com/saltstack-formulas/openssh-formula/blob/master/.salt-lint
The text was updated successfully, but these errors were encountered: