Skip to content

cpplint should warn about any use of exit() or abort() #1902

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

Open
tautschnig opened this issue Mar 2, 2018 · 2 comments
Open

cpplint should warn about any use of exit() or abort() #1902

tautschnig opened this issue Mar 2, 2018 · 2 comments

Comments

@tautschnig
Copy link
Collaborator

Following @martin-cs' suggestion in #1875:

Suggested policy: The only way for normal termination of program execution is via return from main. Abnormal termination is to be handled via the macros provided by invariant.h. Any other use requires explanation and should be explicitly marked as NOLINT.

@martin-cs
Copy link
Collaborator

Slight tweak.

Suggested policy: The only way for normal termination of program execution is via return from main. Explicit abnormal termination should be done via throw, invariant failure (via the macros provided by invariant.h) should also result in abnormal termination. Any other use requires explanation and should be explicitly marked as NOLINT.

@peterschrammel
Copy link
Member

See also #1314

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

3 participants