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

nit: config assert() has no effect #77

Closed
josephg opened this issue May 15, 2014 · 3 comments
Closed

nit: config assert() has no effect #77

josephg opened this issue May 15, 2014 · 3 comments

Comments

@josephg
Copy link
Contributor

josephg commented May 15, 2014

https://github.com/rlidwka/sinopia/blob/master/lib/config.js#L33

assert(arg !== 'all' || arg !== 'owner' || arg !== 'anonymous' || arg !== 'undefined' || arg !== 'none', 'CONFIG: reserved user/uplink name: ' + arg)

Will always be true. Change || to &&.

@rlidwka
Copy link
Owner

rlidwka commented Aug 26, 2014

I wonder, how did you find this error?

I'm trying to find an automated tool to check for things like this, but can't find one.

@josephg
Copy link
Contributor Author

josephg commented Aug 26, 2014

... Nothing fancy. I was just reading through some of the code.

@josephg
Copy link
Contributor Author

josephg commented Aug 26, 2014

... It does seem like the kind of thing you could do automated checks for, but I feel like the kind of people who make static analysers don't write javascript.

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