Closed rmcgibbo closed 3 years ago
Looks like I need to fix this bug since @AndersonTorres encountered it "in the wild".
Hmm, would be nice if we could evaluate the patches attribute and then obtain the corresponding AST nodes for the list items. Need to check if it is possible to write a Nix plug-in for that.
I suppose that's one way to do it. I think the near-term solution is simply to skip the ast-check itself if the node is not of type list
.
Sounds good.
It looks like there are some more complicated
patches
structures (in terms of the AST) out there in the wild that will get incorrectly flagged as "warning: missing-patch-commentpatches
should be a list."Example: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/numpy/default.nix#L55-L66:
Perhaps, if
patches
is not a list, we should just not throw a warning at all...