parameters: (self)
return_statement: return self.validate.success
docstring: Validate.
docstring_summary: Validate.
docstring_tokens: Validate .
function: async def validate_repository(self):
          """Validate."""
          await self.common_validate()
  
          # Custom step 1: Validate content.
          if self.repository_manifest:
              if self.data.content_in_root:
                  self.content.path.remote = ""
  
          if self.content.path.remote == "apps":
              self.data.domain = filters.get_first_directory_in_directory(
                  self.tree, self.content.path.remote
              )
              self.content.path.remote = f"apps/{self.data.name}"
  
          compliant = False
          for treefile in self.treefiles:
              if treefile.startswith(f"{self.content.path.remote}") and treefile.endswith(".cs"):
                  compliant = True
                  break
          if not compliant:
              raise HacsException(
                  f"Repository structure for {self.ref.replace('tags/','')} is not compliant"
              )
  
          # Handle potential errors
          if self.validate.errors:
              for error in self.validate.errors:
                  if not self.hacs.status.startup:
                      self.logger.error("%s %s", self, error)
          return self.validate.success
function_tokens: async def validate_repository ( self ) : await self . common_validate ( ) # Custom step 1: Validate content. if self . repository_manifest : if self . data . content_in_root : self . content . path . remote = "" if self . content . path . remote == "apps" : self . data . domain = filters . get_first_directory_in_directory ( self . tree , self . content . path . remote ) self . content . path . remote = f"apps/{self.data.name}" compliant = False for treefile in self . treefiles : if treefile . startswith ( f"{self.content.path.remote}" ) and treefile . endswith ( ".cs" ) : compliant = True break if not compliant : raise HacsException ( f"Repository structure for {self.ref.replace('tags/','')} is not compliant" ) # Handle potential errors if self . validate . errors : for error in self . validate . errors : if not self . hacs . status . startup : self . logger . error ( "%s %s" , self , error ) return self . validate . success