Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(linter): Allow symbol errors to show (static analysys)
`nix-instantiate --parse` does not just show you sytnax errors, it also has a simple *static analysis* phase, which will check for symbols that are not in scope. For example, for the nix expression: ``` { pkgs }: openjdk ``` nix will highlight openjdk, which cannot work since it is not in scope (user missed that it needs to be in `pkgs.openjdk`). This is extremely helpful. Note that `with pkgs;` will turn off this analysis inside of the `with` expression subtree, because now nix cannot guarantee anything about symbols (any symbol could dynamically come from `pkgs`, which is unknown statically). The fix itself is very easy, these messages don’t have a comma before the at, so just changing the regex a bit gives us this feature.
- Loading branch information