dmi_lint_rule_name

Synopsis

#include <opendmi/lint.h>

const char *dmi_lint_rule_name(const dmi_lint_rule_t *rule);

Description

The dmi_lint_rule_name function returns the printable description of what a lint rule checks, which tools show next to the code of the rule, e.g. entry.checksum.

The name is translated to the locale set by dmi_set_locale, if the library has a translation for the rule: the translation is the string keyed by the code of the rule in the lint-rule table. Otherwise the name is the name member of the parameters of the rule, as the rule declares it. Codes of the rules are never translated.

The name belongs to the rule or to the translation, and must not be freed. An untranslated name is static; a translated one is valid until the locale is changed by dmi_set_locale.

Parameters

rule

Rule to name, e.g. one of the rules returned by dmi_lint_rules.

Return value

Returns the printable name of the rule, or nullptr if rule is nullptr.

Errors

None.

See also