Ask HN: How would you solve case mis-match in C++ includes?
The code is rather clean and not too OS-dependent, so i didn't expect much problems. But straight away i ran into a show-stopper.
The files are all in rather random case - some are lowercase, some are camel-capitalized.
The #include statements in them are also in rather random case.
And the problem is that these two randoms are different randoms that rarely match.
Windows does not care about such things, but in Linux this matters.
So, how would you go about fixing something like that?
On one half, renaming a lot of files to lowercase is a matter of a simple bash script.
But on the other half it's a matter of going through thousands of files and manually changing the case in #include to lowercase...
I was thinking of making a relatively simple CPP-like parser that would look for the right preprocessor statements and fix them, but first i'd like to know whether this bicycle have been invented already.
TL;DR: Is there an existing tool that can go through 2000 cpp and h files and change the #include "..." statements to lowercase?
1 comment
[ 3.3 ms ] story [ 22.1 ms ] thread