BlueBrain / BlueBrain/hpc-coding-conventions

Formatting utility does not work correctly for submodules

Open
#156 0 comments 0 reactions 1 assignee Claimed by @tristan0x View on GitHub
bug clang-format
Dominant language
Python
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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`.

```console
olupton@ewaewa child % pwd
/path/to/parent/external/child
olupton@ewaewa child % git rev-parse --git-dir
/path/to/parent/.git/modules/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](https://github.com/BlueBrain/nmodl) as a submodule of [NEURON](https://github.com/neuronsimulator/nrn))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.