Skip to content

suggestion: add option_missing_docs lint #156

Description

@rrvsh

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions