Skip to content
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

Closed
schriftgestalt opened this issue Oct 4, 2021 · 5 comments
Closed

Code formatting #11

schriftgestalt opened this issue Oct 4, 2021 · 5 comments

Comments

@schriftgestalt
Copy link
Contributor

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?

@paullinnerud
Copy link
Contributor

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.

@schriftgestalt
Copy link
Contributor Author

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.

@HinTak
Copy link
Contributor

HinTak commented Oct 5, 2021 via email

@paullinnerud
Copy link
Contributor

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.

@HinTak
Copy link
Contributor

HinTak commented Oct 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants