Closed efiring closed 3 years ago
Is this something worth enforcing with a linter or something? There is probably a pre-commit for that (but I did not check).
I don't think I want to get into massive reformatting and format policing quite yet. gsw_saar.c is very short compared to the remainder, so I didn't feel quite so bad about the churn. Maybe just start with hooks to check for end-of-line whitespace and EOF newline.
Maybe just start with hooks to check for end-of-line whitespace and EOF newline.
Done in https://github.com/TEOS-10/GSW-C/pull/45 but I would merge this one first to avoid conflicts. Let me know if you are done here so we can merge it.
Oops! I merged #45 first. I will close and reopen to run the check, and fix the file if needed.
Dan Kelley pointed out that there were 4 indendation warnings; in addition, the indentation was highly inconsistent. This commit uses the stock vscode C reformatting function to use uniform 4-space indentation. I also removed a duplicated macro, added a blank line after each one-line "if" block, and rearranged one loop for better readability.