TEOS-10 / GSW-C

C implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)
Other
18 stars 17 forks source link

style: reformat gsw_saar.c #37

Closed efiring closed 3 years ago

efiring commented 3 years ago

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.

ocefpaf commented 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).

efiring commented 3 years ago

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.

ocefpaf commented 3 years ago

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.

efiring commented 3 years ago

Oops! I merged #45 first. I will close and reopen to run the check, and fix the file if needed.