divvun / libdivvun

lib for running gramcheck and other pipelines + cli; modules for CG→spelling, CG→feedback, tagging blanks
https://giellalt.github.io/proof/gramcheck/GrammarCheckerDocumentation.html
GNU General Public License v3.0
9 stars 1 forks source link

clang-format #55

Closed flammie closed 2 years ago

flammie commented 2 years ago

I think we should just clang-format hte code and add .clang-format and be done with it. I put https://github.com/hfst/hfst/blob/master/.clang-format in HFST earlier and https://github.com/apertium/lttoolbox/pull/143 for is apertium's discussion of that but if there's something that fits to existing style better it'd be good too.

snomos commented 2 years ago

Sounds good, please do. @unhammer do you have viewpoints?

unhammer commented 2 years ago

Sounds good to me.

It seems I've used tabs, probably to keep things fairly close to CG-3 (which uses https://github.com/GrammarSoft/cg3/blob/main/.clang-format ). If we choose a format that's fairly close to what the code already has, that would make it easier to compare git region diffs. But apart from that I don't really care about the individual .clang-format settings.

flammie commented 2 years ago

cool, I tested it on few files and changes seemed quite minimal. I did add a max line length because I work most of the time on laptop or smaller devices and with a tiled wm etc. I didn't reformat the existing files I plan to just do it as I go through them..