basex-lsp/webapp/lsp/lint.xqm
2025-08-04 13:00:18 +01:00

31 lines
No EOL
1,016 B
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module namespace lint="lsp/lint";
(:
Describes a problem or hint for a piece of code.
from: number
The start position of the relevant text.
to: number
The end position. May be equal to from, though actually covering text is preferable.
severity: "error" | "hint" | "info" | "warning"
The severity of the problem. This will influence how it is displayed.
markClass?: string
When given, add an extra CSS class to parts of the code that this diagnostic applies to.
source?: string
An optional source string indicating where the diagnostic is coming from. You can put the name of your linter here, if applicable.
message: string
The message associated with this diagnostic.
renderMessage?: fn(view: EditorView) → Node
An optional custom rendering function that displays the message as a DOM node.
actions?: readonly Action[]
An optional array of actions that can be taken on this diagnostic.
:)