plugins.lint.linters

Customize the existing linters by overriding some of their properties.

Type: attribute set of (attribute set)

Default: { }

Example:

{
  phpcs = {
    args = [
      "-q"
      "--report=json"
      "-"
    ];
  };
}

Declared by:

plugins.lint.linters.<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

Declared by:

plugins.lint.linters.<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

Declared by:

plugins.lint.linters.<name>.cmd

The command to call the linter

Type: null or string

Default: null

Example: "linter_cmd"

Declared by:

plugins.lint.linters.<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";
}

Declared by:

plugins.lint.linters.<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

Declared by:

plugins.lint.linters.<name>.parser

The code for your parser function.

Type: null or lua function string

Default: null

Example:

''
  require('lint.parser').from_pattern(pattern, groups, severity_map, defaults, opts)
''

Declared by:

plugins.lint.linters.<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

Declared by:

plugins.lint.linters.<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"

Declared by: