Synthetica9 / nix-linter

Linter for the Nix expression language
BSD 3-Clause "New" or "Revised" License
158 stars 16 forks source link

False postive UnusedArg when argument is used for arguments propagating #42

Open nothingelsematters opened 3 years ago

nothingelsematters commented 3 years ago

first file:

args@{ firstArgument, ... }:

{
   attribute = import ./file.nix args;
}

./file.nix :

{ firstArgument }:

{
  ...
}

./file.nix uses firstArgument of first file's arguments

I get UnusedArgument for firstArgument here

But removing it results in:
anonymous function at .../file.nix:1: called without required argument 'firstArgument', at first-file:10:10