statix
statix copied to clipboard
suggestion: add `option_missing_docs` lint
i'd like to suggest adding a new lint, option_missing_docs, to warn about under-documented uses of lib.options.mkOption.
The lint should trigger for option attribute sets (_type == "option") that are not marked internal = true and not hidden (visible != false) when either description is missing, or none of default, defaultText, or example are provided.
Triggers lint
mkOption {
type = types.str;
}
mkOption {
description = "Port to listen on";
type = types.int;
}
Does not trigger
mkOption {
description = "Port to listen on";
default = 8080;
}
mkOption {
internal = true;
type = types.str;
}
mkOption {
visible = false;
type = types.str;
}