SublimeLinter / SublimeLinter-xmllint

SublimeLinter 3 plugin for XML, using xmllint.
MIT License
29 stars 6 forks source link

Special options based on directories #3

Closed carlosfrodriguez closed 10 years ago

carlosfrodriguez commented 10 years ago

This is more a question than an issue,

for my XML files I would like to be able to lint against an XSD depending on the directory where they are located, for example all files in the doc directory to be linter against a docbook XSD, and all files in the configuration directory to link against a custom XSD file.

I know this is possible by xmllint by a command like:

xmllint --noout --nonet --schema file.xsd

Then the question is if SublimeLinter can set different arguments based on directories, if it is possible can you tell me how to do it?

((enjoy)) cr

aparajita commented 10 years ago

Use a .sublimelinterrc file in the relevant directories with a custom "args" for the linter. For example:

"xmllint": {
   "args": [
      "--schema", "file.xsd"
   ]
}

Note that each arg has to be a separate element in the array. Have you read the SublimeLinter documentation? http://www.sublimelinter.com/en/latest/settings.html#sublimelinterrc-settings