[kea-dev] clang-format

Andrei Pavel andrei.pavel at qualitance.com
Fri Sep 9 14:04:06 UTC 2016


Hello ISC,

In an attempt to automatize code styling, we've been experimenting
with clang-format for the last month.

We've managed to come up with a style[1] that is consistent with Kea
guidelines[2] and the majority of the existing Kea code style.

We'd be happy to see it part of the official Kea repository after
you've experimented with it yourself and modified it as you see fit.

I'm sure you already know this, to use it - you save it in Kea's
source root directory and run clang-format --style=file <filename>.
Use -lines parameter if you want to partially format the file. Lots of
editors (e.g. vim, Eclipse, QtCreator, Atom) have plugins that already
support this via a keyboard shortcut which might be more convenient.

[1] https://gist.github.com/andreipavelQ/48670c206f0538c4116941ea567ff60d
[2] http://kea.isc.org/wiki/CodingGuidelines
--
Andrei
Qualitance


More information about the kea-dev mailing list