コード例 #1
0
 def check_visitor(self, visitor, lines):
     for function_line in visitor.function_defs:
         if string_utils.tosnake(visitor.function_defs[function_line]
                                 ) != visitor.function_defs[function_line]:
             self.fill_error(visitor.function_defs[function_line])
             return 1
     return 0
コード例 #2
0
 def check_visitor(self, visitor, lines):
     for function_line in visitor.function_defs:
         if string_utils.tosnake(visitor.function_defs[function_line]
                                 ) != visitor.function_defs[function_line]:
             self.line = function_line + (1
                                          if self.header_lines != 0 else 0)
             self.fill_error(visitor.function_defs[function_line])
             return 1
     return 0
コード例 #3
0
 def check_norme_dir(self, subdir):
     for sub in subdir:
         if string_utils.tosnake(sub) != sub:
             error_handling.BuErrors.print_error(
                 subdir, subdir, -1, 2, "O4", "File name not in snake_case")
             return 0
コード例 #4
0
 def check_filename(self):
     if self.file_name == "Makefile":
         return 0
     return string_utils.tosnake(self.file_name) != self.file_name
コード例 #5
0
 def check_filename(self):
     return string_utils.tosnake(self.file_name) != self.file_name
コード例 #6
0
 def check_variable_decl(self, var):
     self.fill_error(var.name)
     self.line = var.coord.line + (1 if self.header_lines != 0 else 0)
     return string_utils.tosnake(var.name) != var.name
コード例 #7
0
 def check_filename(self):
     if self.file_name in self.get_config()['excluded_files']:
         return 0
     return string_utils.tosnake(self.file_name) != self.file_name
コード例 #8
0
 def check_variable_decl(self, var):
     self.fill_error(var.name)
     return string_utils.tosnake(var.name) != var.name