<commit_before>#ifndef HAVE_KDBCONFIG
# include "kdbconfig.h"
#endif

#include "noresolver.h"

int elektraNoresolverCheckFile(const char * f ELEKTRA_UNUSED)
{
	return 1;
}

static KeySet * elektraNoresolverModules()
{
	return ksNew (50,
	keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "",
			KEY_VALUE, "" ELEKTRA_PLUGIN_NAME " plugin waits for your orders", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/get",
			KEY_FUNC, elektraNoresolverGet,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/set",
			KEY_FUNC, elektraNoresolverSet,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/error",
			KEY_FUNC, elektraNoresolverError,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/checkfile",
			KEY_FUNC, elektraNoresolverCheckFile,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos",
			KEY_VALUE, "All information you want to know are in keys below", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/author",
			KEY_VALUE, "<NAME> <<EMAIL>>", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/licence",
			KEY_VALUE, "BSD", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/description",
			KEY_VALUE, "The " ELEKTRA_PLUGIN_NAME " just does nothing instead of resolving file names.\n" ,KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/provides",
			KEY_VALUE, "resolver", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/placements",
			KEY_VALUE, "rollback getresolver setresolver commit", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/needs",
			KEY_VALUE, "", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/version",
			KEY_VALUE, PLUGINVERSION, KEY_END),
		KS_END);
}

int elektraNoresolverGet(Plugin *handle ELEKTRA_UNUSED, KeySet *returned ELEKTRA_UNUSED, Key *parentKey ELEKTRA_UNUSED)
{

	Key *root = keyNew("system/elektra/modules/"
			ELEKTRA_PLUGIN_NAME , KEY_END);

	if (keyRel(parentKey, parentKey) >= 0)
	{
		keyDel(root);
		KeySet *info = elektraNoresolverModules();
		ksAppend(returned, info);
		ksDel (info);
		return 1;
	}
	keyDel(root);

	/* get all keys */

	return 1; /* success */
}

int elektraNoresolverSet(Plugin *handle ELEKTRA_UNUSED, KeySet *returned ELEKTRA_UNUSED, Key *parentKey ELEKTRA_UNUSED)
{
	/* set all keys */

	return 1; /* success */
}

int elektraNoresolverError(Plugin *handle ELEKTRA_UNUSED, KeySet *returned ELEKTRA_UNUSED, Key *parentKey ELEKTRA_UNUSED)
{
	/* set all keys */

	return 1; /* success */
}

Plugin *ELEKTRA_PLUGIN_EXPORT(noresolver)<commit_msg>fix contract from noresolver<commit_after>#ifndef HAVE_KDBCONFIG
# include "kdbconfig.h"
#endif

#include "noresolver.h"

int elektraNoresolverCheckFile(const char * f ELEKTRA_UNUSED)
{
	return 1;
}

static KeySet * elektraNoresolverModules()
{
	return ksNew (50,
	keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "",
			KEY_VALUE, "" ELEKTRA_PLUGIN_NAME " plugin waits for your orders", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/get",
			KEY_FUNC, elektraNoresolverGet,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/set",
			KEY_FUNC, elektraNoresolverSet,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/error",
			KEY_FUNC, elektraNoresolverError,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/checkfile",
			KEY_FUNC, elektraNoresolverCheckFile,
			KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos",
			KEY_VALUE, "All information you want to know are in keys below", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/author",
			KEY_VALUE, "<NAME> <<EMAIL>>", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/licence",
			KEY_VALUE, "BSD", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/description",
			KEY_VALUE, "The " ELEKTRA_PLUGIN_NAME " just does nothing instead of resolving file names.\n" ,KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/provides",
			KEY_VALUE, "resolver", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/placements",
			KEY_VALUE, "rollback getresolver setresolver commit", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/needs",
			KEY_VALUE, "", KEY_END),
		keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/version",
			KEY_VALUE, PLUGINVERSION, KEY_END),
		KS_END);
}

int elektraNoresolverGet(Plugin *handle ELEKTRA_UNUSED, KeySet *returned ELEKTRA_UNUSED, Key *parentKey ELEKTRA_UNUSED)
{

	Key *root = keyNew("system/elektra/modules/"
			ELEKTRA_PLUGIN_NAME , KEY_END);

	if (keyRel(root, parentKey) >= 0)
	{
		keyDel(root);
		KeySet *info = elektraNoresolverModules();
		ksAppend(returned, info);
		ksDel (info);
		return 1;
	}
	keyDel(root);

	/* get all keys */

	return 1; /* success */
}

int elektraNoresolverSet(Plugin *handle ELEKTRA_UNUSED, KeySet *returned ELEKTRA_UNUSED, Key *parentKey ELEKTRA_UNUSED)
{
	/* set all keys */

	return 1; /* success */
}

int elektraNoresolverError(Plugin *handle ELEKTRA_UNUSED, KeySet *returned ELEKTRA_UNUSED, Key *parentKey ELEKTRA_UNUSED)
{
	/* set all keys */

	return 1; /* success */
}

Plugin *ELEKTRA_PLUGIN_EXPORT(noresolver)
{'fraction_non_alphanumeric': 0.12628591699184108, 'fraction_numerical': 0.002837885775097552, 'mean_word_length': 5.210352422907489, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4874122', 'n_tokens_mistral': 2307, 'n_tokens_neox': 2181, 'n_words': 426}