Is your feature request related to a problem? Please describe.
Relying on sane defaults might be desirable for some users
And explicitly assigning a key to a value already being its default is not relying on that sane default
Example:
module
{ lib, ... }:
{
options.key = lib.mkOption { };
config.key = lib.mkDefault "value";
}
consumer (explicitly and redundantly assigning its default value)
Hence, it might be interesting to raise (info / warn) when an assignment is similar to the default
Describe the solution you'd like
Raise (info / warn) when an assignment is similar to the default
module
{ lib, ... }:
{
options.key = lib.mkOption { };
config.key = lib.mkDefault "value";
}
consumer (explicitly and redundantly assigning its default value)
{
key = "value"; # INFO / WARN: key `key` assignment `"value"` similar to its default
}
Describe alternatives you've considered
No response
Additional context
Is your feature request related to a problem? Please describe.
Relying on sane defaults might be desirable for some users
And explicitly assigning a key to a value already being its default is not relying on that sane default
Example:
module
consumer (explicitly and redundantly assigning its default value)
Hence, it might be interesting to raise (info / warn) when an assignment is similar to the default
Describe the solution you'd like
Raise (info / warn) when an assignment is similar to the default
module
consumer (explicitly and redundantly assigning its default value)
Describe alternatives you've considered
No response
Additional context