forked from enlightenment/efl
eolian: globally enable eolian_state_check, except for beta classes
Beta classes won't have their namespaces validated at this point. It is possible to set EOLIAN_CHECK_NAMESPACES_BETA=1 to enable checking those as well, if you want to fix them all.
This commit is contained in:
parent
7791d9fac6
commit
1afb264288
|
@ -268,6 +268,9 @@ _check_namespaces(const Eolian_Unit *src)
|
|||
Eina_Bool ret = EINA_TRUE;
|
||||
Eina_Iterator *itr = eina_hash_iterator_data_new(src->objects);
|
||||
const Eolian_Object *obj;
|
||||
|
||||
Eina_Bool check_beta = !!getenv("EOLIAN_CHECK_NAMESPACES_BETA");
|
||||
|
||||
EINA_ITERATOR_FOREACH(itr, obj)
|
||||
{
|
||||
char const *dot = strrchr(obj->name, '.');
|
||||
|
@ -277,7 +280,7 @@ _check_namespaces(const Eolian_Unit *src)
|
|||
dot - obj->name);
|
||||
const Eolian_Object *cobj = eina_hash_find(src->objects, ssr);
|
||||
eina_stringshare_del(ssr);
|
||||
if (cobj)
|
||||
if (cobj && (check_beta || !eolian_object_is_beta(cobj)))
|
||||
{
|
||||
eolian_state_log_obj(src->state, obj,
|
||||
"the namespace of object '%s' conflicts with %s:%d:%d",
|
||||
|
|
|
@ -12,10 +12,8 @@ EFL_START_TEST(eolian_static_check)
|
|||
fail_if(!eolian_state_directory_add(eos, EO_SRC_DIR));
|
||||
fail_if(!eolian_state_all_eot_files_parse(eos));
|
||||
fail_if(!eolian_state_all_eo_files_parse(eos));
|
||||
#if 0
|
||||
/* too many failures to enable this yet */
|
||||
fail_if(!eolian_state_check(eos));
|
||||
#endif
|
||||
eolian_state_free(eos);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
|
Loading…
Reference in New Issue