(check)
return None
Validate that the given check does not use the legacy agent signature (contains agentConfig)
Validate that the given check does not use the legacy agent signature (contains agentConfig)
Validate that the given check does not use the legacy agent signature ( contains agentConfig )
def find_legacy_signature(check):
    """
    Validate that the given check does not use the legacy agent signature (contains agentConfig)
    """
    for path, _, files in os.walk(get_check_directory(check)):
        for f in files:
            if f.endswith('.py'):
                file_path = os.path.join(path, f)
                with open(file_path) as test_file:
                    for num, line in enumerate(test_file):
                        if "__init__" in line and "agentConfig" in line:
                            return file_path, num + 1
    return None
def find_legacy_signature ( check ) : for path , _ , files in os . walk ( get_check_directory ( check ) ) : for f in files : if f . endswith ( '.py' ) : file_path = os . path . join ( path , f ) with open ( file_path ) as test_file : for num , line in enumerate ( test_file ) : if "__init__" in line and "agentConfig" in line : return file_path , num + 1 return None