(core): header includes are not properly sorted
Summary
The header includes sort relies on the Sight < 21 source tree, i.e. the split in src/
and include/
to find the name of the current target. Thus the algorithm fails today to find it and does not sort includes.
Steps to reproduce
Run sheldon on a single file in a sight clone where src/
and include/
is not present (people often have a src
folder...).
You should observe the following log:
* [Sheldon] Beautifier phase :
* [Sheldon] Using uncrustify: /home/fbridault/software/uncrustify/bin/uncrustify
* [Warning] Failed to find current library for file /home/fbridault/dev/sight/modules/viz/scene3d/SFoo.cpp, includes order might be wrong.
*
*** [ERROR] Include headers are not correctly sorted in file : /home/fbridault/dev/sight/modules/viz/scene3d/SFoo.cpp. ***
Possible fixes
Adapt the code to the new file tree.