-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Case 1. unused with in maintainer list
Removing with lib.maintainers; [ ] because nixf-tidy complaints about with being unused. #330664
Opposed view: #330664 (comment) A package should have maintainers. A package that does not have a maintainer is a special case. Keeping this with can help reduce diff.
Supporting view: #330232 (comment) An exception should not be made here, it would make the rule unnecessarily complex.
Case 2. Unused helper functions in files for enumeration
In an enumerated file, a function that may be used needs to be removed or commented out because there is no use case for the time being, in order to pass nixf-tidy's check. https://github.com/NixOS/nixpkgs/pull/331017/files
Opposed view: Not being used is temporary, being used is normal, and the placed function has a documentation functionality.
Case 3. Unused argument in commonly used builder function
Arguments such as pname, version, src are not used directly, but are passed in as { ... }@args and args is further passed to underlying builder function. nixf-tidy suggests these arguments should be deleted. #330589
Opposed view: They can capture missing arguments as early as possible, and have certain documentation functionality, because this information can be obtained using functionArgs.
Supporting view: #330589 (comment) They can cause problems, such as making arguments with a default value to be actually undefined (example: in doInstallCheck = attrs.doCheck or true;, doInstallCheck is true if doCheck is not passed as an argument, even if doCheck defaults to false); there are better ways to write them; functionArgs is not good documentation and should be replaced by doc-comments in the future.
CC @inclyc @SuperSandro2000 @AndersonTorres @piegamesde @Mic92 @mweinelt @jian-lin