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

Multi-line if statements without braces #12

Closed
danxexe opened this issue Dec 27, 2016 · 0 comments
Closed

Multi-line if statements without braces #12

danxexe opened this issue Dec 27, 2016 · 0 comments

Comments

@danxexe
Copy link
Contributor

danxexe commented Dec 27, 2016

Multi-line if statements without braces are kinda dangerous:

if (!regex.test(key))
    throw new Ebanx.errors.invalidValueField('Invalid PublishableKey.', 'PublishableKey');

The recommendation is to either keep the condition and the body on the same line or to add braces around the body.

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