`--exclude` option has no effect
- Dominant language
- Rust
- Stars
- 781
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
As titled:
```
$ deadnix --exclude packages/shells/cod/default.nix -- \
| grep packages --context=3
70 │ (final: prev: {
│ ╰─── Unused lambda argument: final
Warning: Unused declarations were found.
╭─[./packages/shells/cod/default.nix:2:3]
2 │ stdenv,
│ ╰─── Unused lambda pattern: stdenv
Warning: Unused declarations were found.
```
```
$ deadnix --exclude packages/shells/cod/default.nix -- packages/shells/cod/default.nix \
| grep packages --context=3
Warning: Unused declarations were found.
╭─[packages/shells/cod/default.nix:2:3]
2 │ stdenv,
│ ╰─── Unused lambda pattern: stdenv
```
Edit: This is v1.2.0 from nixos-unstable. I figured that'd be the most recent, but it looks like there's also v1.2.1. However, it makes no difference:
```
$ nix run github:astro/deadnix -- --exclude packages/shells/cod/default.nix -- packages/shells/cod/default.nix
Warning: Unused declarations were found.
╭─[packages/shells/cod/default.nix:2:3]
2 │ stdenv,
│ ╰─── Unused lambda pattern: stdenv
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the deadnix CLI entry point and the handling of the --exclude argument, then reproduce the commands using packages/shells/cod/default.nix. Done means excluding that path suppresses its unused-declaration warnings in both directory scans and explicit-file input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100