-
Notifications
You must be signed in to change notification settings - Fork 28
[Coding Guideline]: Ensure all loops have a termination condition that is provably reachable #305
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
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for scrc-coding-guidelines failed.
|
made code examples complete
|
Interesting rule. Are we sure there aren't safety-critical systems which have at least one thread that loops forever? @rcseacord |
@felix91gr quite possibly. the philosophy behind this rule (which is quite common in MISRA) is that this is pretty dangerous and so it should always be flagged by the analyzer. any time you have an infinite loop in your code will require a deviation permit, meaning that that infinite loops will always be scrutinized more carefully (presumably by a senior engineer who audits these things). Presumably there aren't many of these in any given system (I would guess at most one) so the burden isn't that high. |
|
@guidelines-bot /commands |
|
ℹ️ Available Commands Pass or step away:
Assign reviewers:
Other:
|
No description provided.