mobile-shell / mosh

Mobile Shell
https://mosh.org
GNU General Public License v3.0
12.69k stars 741 forks source link

clang-format Mosh #1253

Closed bbarenblat closed 1 year ago

bbarenblat commented 1 year ago

Create a clang-format file, mark some regions with // clang-format off, and format the codebase.

keithw commented 1 year ago

Cool! FWIW if you want a .clang-format that tries to approximate the "keithw coding style" that Mosh was written in, we've been using https://github.com/fix-project/fix/blob/master/.clang-format . But things have probably drifted; I'm not sure if the one in this PR is closer to Mosh-as-it-stands or the one I linked to. To be clear I think you should pick whatever style you want.

bbarenblat commented 1 year ago

I have reformatted using @keithw’s clang-format file. Thanks, Keith!

bbarenblat commented 1 year ago

Per discussion offline, I have set BreakConstructorInitializers to BeforeColon and tweaked a couple of initializer lists to look a nicer.