in rules/nested_block.go [254:277]
func (b *NestedBlock) checkSubSectionOrder() bool {
sections := []Section{
b.HeadMetaArgs,
b.RequiredArgs,
b.OptionalArgs,
b.RequiredNestedBlocks,
b.OptionalNestedBlocks,
}
lastEndLine := -1
for _, s := range sections {
if !s.CheckOrder() {
return false
}
r := s.GetRange()
if r == nil {
continue
}
if r.Start.Line <= lastEndLine {
return false
}
lastEndLine = r.End.Line
}
return true
}