metamath / metamath-exe

Metamath program - source code for the Metamath executable
GNU General Public License v2.0
77 stars 25 forks source link

mmwtex.c: boolean-style evaluation in conditionals (+ linting) #167

Closed benjub closed 8 months ago

benjub commented 11 months ago

Found some inconsistencies while on #160, which I signal as TODOs in this PR. I also made some simplifications (mainly, evaluate boolean-like variables as bools) and linting, all in mmwtex.c.

benjub commented 8 months ago

@digama0 : following approval by Thierry, can you merge this one ?

benjub commented 8 months ago

I didn't apply the four suggestions changing imperative to indicative since I thought it was the opposite convention, but I'm unsure. I'll let you decide to apply or not before merging.

digama0 commented 8 months ago

I took a census of how this is used in the .h file comments on all functions. As expected, there has not historically been any consistency about this, but the indicatives seem to be winning:

Doxygen seems to have thrown its opinion into the ring slightly with the \returns keyword. My preference is to standardize on indicative mood, perhaps it should be added as an additional element to the "code cleanup" issue?

benjub commented 8 months ago

perhaps it should be added as an additional element to the "code cleanup" issue?

Done. (Add suggestions applied.)