plugins.lint.customLinters
Configure the linters you want to run per file type. It can be both an attrs or a string containing the lua code that returns the appropriate table.
Type: attribute set of (string or (attribute set))
Default:
{ }
Example:
{ }
Declared by:
plugins.lint.customLinters.<name>.append_fname
Automatically append the file name to args
if stdin = false
Whether this parser supports content input via stdin.
In that case the filename is automatically added to the arguments.
Default: true
Type: null or boolean
Default:
null
Example:
false
plugins.lint.customLinters.<name>.args
List of arguments. Can contain functions with zero arguments that will be evaluated once the linter is used.
Default: []
Type: null or (list of (string or raw lua code))
Default:
null
Example:
null
plugins.lint.customLinters.<name>.cmd
The command to call the linter
Type: string
Example:
"linter_cmd"
plugins.lint.customLinters.<name>.env
Custom environment table to use with the external process. Note that this replaces the entire environment, it is not additive.
Type: null or (attribute set of string)
Default:
null
Example:
{
FOO = "bar";
}
plugins.lint.customLinters.<name>.ignore_exitcode
Whether the linter exiting with a code !=0 should be considered normal.
Default: false
Type: null or boolean
Default:
null
Example:
true
plugins.lint.customLinters.<name>.parser
The code for your parser function.
Type: lua function string
Example:
''
require('lint.parser').from_pattern(pattern, groups, severity_map, defaults, opts)
''
plugins.lint.customLinters.<name>.stdin
Whether this parser supports content input via stdin. In that case the filename is automatically added to the arguments.
Default: true
Type: null or boolean
Default:
null
Example:
false
plugins.lint.customLinters.<name>.stream
configure the stream to which the linter outputs the linting result.
Default: "stdout"
Type: null or one of “stdout”, “stderr”, “both”
Default:
null
Example:
"stderr"