Closed NiklasKunkel closed 6 years ago
Hi!
You can set command line arguments using the args setting. See http://www.sublimelinter.com/en/stable/linter_settings.html#args
I received the following error when trying to add arguments to sublimelinter settings according to the documentation above. Can anyone provide better direction on this?
Additional properties are not allowed ('args' was unexpected) Invalid settings in 'Packages/User/SublimeLinter.sublime-settings': Additional properties are not allowed ('args' was unexpected)
args
is setting that that belongs to a specific linter.
In the settings more like
# yaml bc it's easier to write
linters:
shellcheck:
args: [...]
@kaste
Are you able to be more specific on the configuration to add -x flag? I've been trying to get shellcheck -x to work with sublime text and SublimeLinter for a few months.
@Aub-C what did you try, what did your setting look like?
For the sake of others – this is what works for me (Mac OS X):
// SublimeLinter Settings - User
{
"linters": {
"shellcheck": {
"args": ["-x"],
"working_dir": "$file_path"
}
}
}
You probably want to set working_dir
to the dir of the file to check, not the project root (the default).
On MacOS, you can easily edit this file from within Sublime Text. I found restarting Sublime Text was not required. Add the -x
option by editing and saving the settings file opened by the menu:
Sublime Text > Preferences > Package Settings > SublimeLinter > Settings
I have some code where I'm sourcing other files which returns with an [SC1091] How can I get SubelimeLinter-shellcheck to call shellcheck with the -x flag so I can enable following?