does not return the expected result when run inside a submodule.
Given a parent project /path/to/parent with a submodule /path/to/parent/external/child the above code returns /path/to/parent/.git/modules/external when run in /path/to/parent/external/child.
This code: https://github.com/BlueBrain/hpc-coding-conventions/blob/c539260e20d94033ce2eaa69e0aab1c78451d4d6/cpp/lib.py#L59-L91
does not return the expected result when run inside a submodule.
Given a parent project
/path/to/parent
with a submodule/path/to/parent/external/child
the above code returns/path/to/parent/.git/modules/external
when run in/path/to/parent/external/child
.This means that the formatting utility fails to find
/path/to/parent/external/child/.bbp-project.yaml
and formatting the child project fails.(Example: NMODL as a submodule of NEURON)