Linting¶
The ubCode language server has a linting feature built in and detects a broad range of RST issues. The linting feature is enabled by default. Specific rules can be deactivated in the ubproject.toml file.
Lint errors appear in the editor as well as in the problems tab.
Supported lint rules:
Identifier |
Description |
|---|---|
|
Warns on tabs in a line, which can degrade performance of source mapping. |
|
Warns on missing blank lines between syntax blocks. |
|
Warns on issues with title under/over lines. |
|
Warns on unexpected titles in a context where they are not allowed. |
|
Warns on unexpected indentation of a paragraph line. |
|
Warns on literal blocks with no content. |
|
Warns on malformed hyperlink targets. |
|
Warns on malformed substitution definition. |
|
Warns on malformed tables. |
|
Warns on inconsistent title levels, e.g. a level 1 title style followed by a level 3 style. |
|
Warns on unknown directives. |
|
Warns if the second line of a directive starts with an indented |
|
Warns on malformed directives. |
|
Warns on directives with missing required content. |
|
Warns on inline markup with no closing marker. |
|
Warns on malformed inline roles. |
|
Warns on inline roles with no name. |
Codelinks diagnostics¶
Added in version 0.29.0.
In addition to RST linting,
ubCode validates codelinks one-line markers in source files
(C/C++, Python, Rust, C#, YAML).
When a file belongs to a codelinks project,
marker syntax issues are reported as warnings with the source label ubcode-codelinks.
See Tracing Source Code with Codelinks for the full list of warning codes and details.