A program should have a maximum level of nesting loops. If your program has too many nested loops (if/for/while), consider refactoring your program to avoid too many nesting levels.
Non-Compliant Code Examples
whilebla:whilefoo:whilebar:whilebaz:pass
Compliant Code Examples
whilebla:whilefoo:whilebar:pass
Seamless integrations. Try Datadog Code Analysis
Datadog Code Analysis
Try this rule and analyze your code with Datadog Code Analysis
How to use this rule
1
2
rulesets:- python-best-practices # Rules to enforce Python best practices.
Create a static-analysis.datadog.yml with the content above at the root of your repository
Use our free IDE Plugins or add Code Analysis scans to your CI pipelines