Enhance namespace detection
Status: Alpha
Brought to you by:
cedric-vidal
Given a unit's namespace, if the last chunk of the namespace is contained in the identifier and the unit is alone in the namespace, then remove the last chunk of the namespace.
For example, given:
U1:
namespace: com.foo.bar.gui
identifier: foo-bar-gui
U2:
namespace: com.foo.bar.data
identifier: foo-bar-data
'gui' is contained in 'foo-bar-gui' and U1 is the only unit in namespace com.foo.bar.gui, so move foo-bar-gui to namespace com.foo.bar