58 lines
1.9 KiB
Plaintext
58 lines
1.9 KiB
Plaintext
= Integrate with tools that check files for problems.
|
|
|
|
Many file-formats have "lint" tools that check for common problems and point out
|
|
where they occur. Most of these tools produce output in the the traditional
|
|
message format:
|
|
|
|
----
|
|
{filename}:{line}:{column}: {kind}: {message}
|
|
----
|
|
|
|
If the 'kind' field contains 'error', the message is treated as an error,
|
|
otherwise it is assumed to be a warning.
|
|
|
|
This plugin can run such tools and collect the resulting messages. The complete
|
|
output is collected in the `*lint-output*` buffer, and any lines in the current
|
|
file with messages will have a marker displayed next to them in the left margin.
|
|
When the cursor moves onto a line with the problem, the associated messages will
|
|
be displayed in a tool tip..
|
|
|
|
== Commands
|
|
|
|
*lint-buffer*::
|
|
*alias* lint +
|
|
Pass the entire buffer through the program named in `lintcmd`. The buffer
|
|
may contain unsaved changes.
|
|
|
|
*lint-selections* [-command <cmd>]::
|
|
Pass each of the selections through `<cmd>` or, if the `-command` switch is
|
|
not provided, through the program named in `lintcmd`. The buffer may contain
|
|
unsaved changes.
|
|
|
|
*lint-hide-diagnostics*::
|
|
Hide line markers and disable the automatic display of messages, if any.
|
|
|
|
*lint-next-message*::
|
|
Jump to the next message generated by the last `lint-buffer` or
|
|
`lint-selections` command.
|
|
|
|
*lint-previous-message*::
|
|
Jump to the previous message generated by the last `lint-buffer` or
|
|
`lint-selections` command.
|
|
|
|
== Options
|
|
|
|
*lintcmd* (str)::
|
|
The shell command used by lint-buffer and lint-selections.
|
|
+
|
|
It will be given the path to a file containing the text to be
|
|
linted, and must produce output in the format:
|
|
|
|
|
|
*toolsclient* (str)::
|
|
If set, the `:lint` command (and other commands that point out files and
|
|
line-numbers) will try to display its results in the Kakoune client with
|
|
this name.
|
|
See <<commands#clients-and-sessions,`:doc commands clients-and-sessions`>>
|
|
|