Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert when underscore-prefixed variable is used? #90

Open
srhb opened this issue Dec 11, 2024 · 2 comments
Open

Alert when underscore-prefixed variable is used? #90

srhb opened this issue Dec 11, 2024 · 2 comments

Comments

@srhb
Copy link

srhb commented Dec 11, 2024

This may be controversial, but since nix doesn't have a way to detect this (does it?) it seems easy to accidentally reintroduce a dependency on an underscore'd-by-deadnix var, and deadnix won't detect this. Perhaps that should be a failure too?

Controversy because: Now it's slightly alivenix 😅

@astro
Copy link
Owner

astro commented Dec 11, 2024

In my opinion it's bad style to use "unused variables" that start with an underscore.

How about enabling this reporting with an additional command-line flag?

@srhb
Copy link
Author

srhb commented Dec 11, 2024

Yes, I agree, and that's what I was trying to convey: I want it to warn me/fail if someone uses an underscored var. :) Flag is great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants