nasa / LC

The Core Flight System (cFS) Limit Checker (LC) application.
Apache License 2.0
30 stars 21 forks source link

Redundant comments (/* end of function */, /* end if */ etc.) and clean up empty lines. #43

Closed thnkslprpt closed 1 year ago

thnkslprpt commented 1 year ago

Checklist

Describe the bug Copy of https://github.com/nasa/to_lab/issues/68 and https://github.com/nasa/sample_app/issues/111 There are quite a few redundant comments in the code, such as:

Another minor issue has to do with empty lines: a) unnecessary empty lines (e.g. first line after the opening brace of a function/struct, or the last line before the closing brace - the latter apparently sometimes triggers the CI format checks). b) missing empty lines between functions (i.e. closing brace of last function, then next function beginning on the immediately next line without an empty line in between)

The unnecessary empty lines (at the beginning or end of a function, for example) represent a low single-digit percentage of the cases (the vast majority of functions/structs do not have these extra empty lines), so there is an argument to remove them purely for consistency, not just due to them being redundant and triggering the CI format checks.

Expected behavior Remove redundant comments to reduce clutter and inconsistency in the code, and improve readability.

Reporter Info @thnkslprpt