To my knowledge there isn't any such feature in Jenkins.
A code quality checker could be setup, that enforces coding conventions 
with nesting restrictions being one of them.

"... have it just ignored" - code that is regarded bad/buggy in your 
environment should not be ignored, but the developer be blamed.

But the outlined code fragment does not exhibit a nesting of 4 levels, it 
looks OK to me.
Do you mean something like
node {
  node('agent') {
    node(''agent') {
      node('agent') {
Which is indeed obviously flawed.



[email protected] schrieb am Donnerstag, 4. Februar 2021 um 16:55:37 
UTC+1:

> Not sure if this is the right place for this type of question... but
>
> node {
>    node('agent'){ 
>    }
> }
>
> Any way to block the nested node.  Keep getting these developers writing 
> loops with these nested nodes and wonder why their job with 4 levels of 
> nesting is not running on an executor of 3.   (and all calling the same 
> node)
>
> I know firing them is always an option :)   Just wanted to see if there 
> was a way to limit or block the nesting and have it just ignored.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/ae5867ba-c81c-49bb-9dac-a0dc9fc9bf3cn%40googlegroups.com.

Reply via email to