Cette page n'est pas encore disponible en français, sa traduction est en cours. Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
Metadata
ID:python-best-practices/too-many-while
Language: Python
Severity: Warning
Category: Best Practices
Description
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