parameters: (self)
docstring: Validate `group=` attributes on `<param>` and `<proto>` tags.
  
          Check that `group=` attributes match actual groups
docstring_summary: Validate `group=` attributes on `<param>` and `<proto>` tags.
docstring_tokens: Validate group = attributes on <param > and <proto > tags .
function: def validateGroups(self):
          """Validate `group=` attributes on `<param>` and `<proto>` tags.
  
          Check that `group=` attributes match actual groups"""
          # Keep track of group names not in <group> tags
          badGroup = {}
          self.gen.logMsg('diag', 'VALIDATING GROUP ATTRIBUTES')
          for cmd in self.reg.findall('commands/command'):
              proto = cmd.find('proto')
              # funcname = cmd.find('proto/name').text
              group = proto.get('group')
              if group is not None and group not in self.groupdict:
                  # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group)
                  if group not in badGroup:
                      badGroup[group] = 1
                  else:
                      badGroup[group] = badGroup[group] + 1
  
              for param in cmd.findall('param'):
                  pname = param.find('name')
                  if pname is not None:
                      pname = pname.text
                  else:
                      pname = param.get('name')
                  group = param.get('group')
                  if group is not None and group not in self.groupdict:
                      # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group)
                      if group not in badGroup:
                          badGroup[group] = 1
                      else:
                          badGroup[group] = badGroup[group] + 1
  
          if badGroup:
              self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS')
              for key in sorted(badGroup.keys()):
                  self.gen.logMsg('diag', '    ', key, ' occurred ', badGroup[key], ' times')
function_tokens: def validateGroups ( self ) : # Keep track of group names not in <group> tags badGroup = { } self . gen . logMsg ( 'diag' , 'VALIDATING GROUP ATTRIBUTES' ) for cmd in self . reg . findall ( 'commands/command' ) : proto = cmd . find ( 'proto' ) # funcname = cmd.find('proto/name').text group = proto . get ( 'group' ) if group is not None and group not in self . groupdict : # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) if group not in badGroup : badGroup [ group ] = 1 else : badGroup [ group ] = badGroup [ group ] + 1 for param in cmd . findall ( 'param' ) : pname = param . find ( 'name' ) if pname is not None : pname = pname . text else : pname = param . get ( 'name' ) group = param . get ( 'group' ) if group is not None and group not in self . groupdict : # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) if group not in badGroup : badGroup [ group ] = 1 else : badGroup [ group ] = badGroup [ group ] + 1 if badGroup : self . gen . logMsg ( 'diag' , 'SUMMARY OF UNRECOGNIZED GROUPS' ) for key in sorted ( badGroup . keys ( ) ) : self . gen . logMsg ( 'diag' , '    ' , key , ' occurred ' , badGroup [ key ] , ' times' )