-
Notifications
You must be signed in to change notification settings - Fork 660
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
size[block]: Limit the maximum block depth #2173
Comments
@ssbarnea I can try fixing this |
@Ruchip16 Any updates on it? Asking as I might do it myself if you don't have time. |
hey, yes I can try doing it, actually you said that you would assign me this issue after adding to the ansible org, so I was waiting for that but nevertheless, i would start now. |
This one should be easy to implement via If we have >20 items, we can raise "Replace long block with an include_tasks to make code easier to maintain." |
Starting to pull in possible rule ideas from the community of practice: redhat-cop/automation-good-practices#64
Ofter, using an include within a block leads to more readable playbooks and task file vs. a deep block depth.
It might not be possible to check across files and I'm not sure lint tracks block state, but within a single file we should be able to limit it.
2 was suggested only as a starting point
The text was updated successfully, but these errors were encountered: