linkml lint¶
Validate a LinkML schema against the metamodel and check it against configurable quality rules.
Usage¶
linkml lint schema.yaml
linkml lint runs two levels of checking:
Metamodel validation — verifies the schema conforms to the LinkML metamodel (required fields, valid types, URI format, NCName constraints). This always runs and cannot be disabled.
Quality rules — checks best practices like naming conventions, recommended fields, canonical prefixes, and tree root classes. These are configurable via a
.linkmllint.yamlconfiguration file.
If you only need to check whether a schema is structurally valid (without
quality rules), use linkml validate schema.yaml instead.
Deprecated¶
--validate— metamodel validation now always runs. This flag has no effect and will be removed in a future release.--validate-only— uselinkml validate schema.yamlinstead.
Reference¶
linkml lint¶
Run linter on SCHEMA.
SCHEMA can be a single LinkML YAML file or a directory. If it is a directory every YAML file found in the directory (recursively) will be linted.
linkml lint [OPTIONS] SCHEMA
Options
- -a, --all¶
Process files that start with ‘.’.
- -c, --config <config>¶
Custom linter configuration file.
- -f, --format <format>¶
Report format.
- Default:
'terminal'- Options:
terminal | markdown | json | tsv
- --validate¶
Metamodel validation now always runs. This flag has no effect.(DEPRECATED)
- --validate-only¶
Use ‘linkml validate schema.yaml’ instead.(DEPRECATED)
- -v, --verbose¶
- -o, --output <output>¶
Report file name.
- --ignore-warnings¶
Do not exit with an error status if only warnings are found.
- --max-warnings <max_warnings>¶
Do not exit with an error status if up to this number of warnings (and no errors) are found.
- Default:
0
- --fix, --no-fix¶
- -V, --version¶
Show the version and exit.
Arguments
- SCHEMA¶
Required argument