This change also refactors the uix library to remove an unnecessary class (LayoutNode.) The refactoring helps writing cleaner script by accessing only the node object instead of xml and node. This change also augment the capabilities of the node in Groovy scripts. Change-Id: Id7515f9a79826909834d82496a6d9dfbc19988ad
12 lines
348 B
Plaintext
12 lines
348 B
Plaintext
// Rule: TooManyLevels
|
|
//
|
|
// Description: Checks whether the layout has too many nested groups.
|
|
//
|
|
// Conditions:
|
|
// - The depth of the layout is > 10
|
|
|
|
if (node.isRoot() && (depth = node.depth()) > 10) {
|
|
analysis << [node: null, description: "This layout has too many nested layouts: " +
|
|
"${depth} levels, it should have <= 10!"]
|
|
}
|