question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warn about possibly infinite `while`

See original GitHub issue

Rule request

Check that while True block has raise or return.

UPD: and break too.

Thesis

It’s OK to not have them for CLI entry point, but in other cases, it can be an error. So, let’s ask users explicitly noqa such cases to be sure that they really know what they’re doing.

Reasoning

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
pandasealcommented, Feb 26, 2020

@sobolevn should I create an issue where we can discuss this further? For example where the information should be added in CONTRIBUTING.md and on which level it should be described? (I mean, at this point is not really relevant for this issue)

1reaction
sobolevncommented, Nov 18, 2019

Sure, I would be happy to answer your questions! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the point of issuing a compiler warning for "while(true ...
Compiler warning are here to help catch potential bugs. Using an always true condition in a while loop is probably an error.
Read more >
114763 – [DCR] warn on potentially infinite loops - Bugs
I think it could be detected where the condition of a while loop will always remain true throughout the execution of the loop...
Read more >
V3120. Potentially infinite loop. The variable from the loop exit ...
The analyzer detected a potentially infinite loop with its exit condition depending on a variable whose value never changes between ...
Read more >
Warning if do while is in an endless loop - Studio
Hello together, I need some help with my “do while”-Activity. In my process the bot starts a report in SAP. Because it is...
Read more >
Does Power Automate Flow "Update SharePoint List ... - Reddit
It doesn't necessarily mean there is an infinite loop, just that it's possible. You should of course use trigger conditions to prevent your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found