-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code formatting #11
Comments
The code is very messy. Some of it started on Mac decades ago, went to Windows and now back to Mac again. Inconsistent usage of tabs and spaces, etc. A clang-format file would be nice. I believe VSCode supports those or supports an extension that supports. Probably does not help those who use Visual Studio though. |
I think my format file is already in HinTaks repo. I didn’t apply it, yet. So you can try and maybe edit it before we apply it to the whole source. |
Yes, the clang-format file is already in mine. I would prefer that the more obvious warnings get fixed first before large cosmetic changes though. I know I broke my own preference, changing all the mac-roman encoded comments and win 1252 comments into unicode (this is a "cosmetic" change in my book) but it is an extension of the non-ascii wide character literal fix, which is a code fix...
It was quite surprising to find non-ascii comments of the mac-roman encoded type and win 1252 type, (and in one file, both types in different sections). It certainly suggests a very long and pre-unicode history of the code base, as well as it having passed between mac and windows.
|
Yes, VTT was originally written decades ago on the Mac. It was then ported to Windows NT and for a time both Mac and Windows versions were maintained. Then eventually the Mac was dropped when Apple had a dev platform change. |
The code currently generates a few "misleading indentation" / "dangling-else" warnings - I looked at one of them (the one in getopt.h) , and it is not entirely clear that it is mis-intented, instead of braces being mistakenly removed (when bits were being removed from full vtt to vttcompile). So that's another reason not to reindent, until those are fixed. Re-indent at the stage, if the code is actually broken because braces were mis-removed, would make it more difficult to fix. Basically I am very against large cosmetic changes before almost all the warnings are addressed/looked at. |
The code format is a bit messy. I could make a clang-format file that is close to what most of the code looks like?
The text was updated successfully, but these errors were encountered: