def process_validation(validation, is_compatibility=False, file_hash=None):
 validation = fix_addons_linter_output(validation)
 if is_compatibility:
  mangle_compatibility_messages(validation)
 validation.setdefault('ending_tier', 0)
 if ((not validation['ending_tier']) and validation['messages']):
  validation['ending_tier'] = max((msg.get('tier', (-1)) for msg in validation['messages']))
 if file_hash:
  ValidationComparator(validation).annotate_results(file_hash)
 limit_validation_results(validation)
 htmlify_validation(validation)
 return validation

def process_validation ( validation , is_compatibility = False , file_hash = None ) : validation = fix_addons_linter_output ( validation ) if is_compatibility : mangle_compatibility_messages ( validation ) validation . setdefault ( 'ending_tier' , 0 ) if ( ( not validation [ 'ending_tier' ] ) and validation [ 'messages' ] ) : validation [ 'ending_tier' ] = max ( ( msg . get ( 'tier' , ( - 1 ) ) for msg in validation [ 'messages' ] ) ) if file_hash : ValidationComparator ( validation ) . annotate_results ( file_hash ) limit_validation_results ( validation ) htmlify_validation ( validation ) return validation
process validation results into the format expected by the web frontend .