[OpenAFS-devel] Coding Style Guide
Michael Meffie
mmeffie@sinenomine.net
Tue, 29 May 2018 10:32:56 -0400
On Thu, 24 May 2018 10:51:41 -0500
Pat Riehecky <riehecky@fnal.gov> wrote:
> I was looking over https://wiki.openafs.org/devel/CodingStyle/ and=20
> wondered if it might be worth considering basing the OpenAFS style on=20
> one of these:
>=20
>=20
> https://llvm.org/docs/CodingStandards.html
> https://google.github.io/styleguide/cppguide.html
> https://www.chromium.org/developers/coding-style
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_S=
tyle
>=20
>=20
> clang-format lets you make a custom based off of these.=A0 In theory this=
=20
> could allow regular runs of clang-format to fix style errors (or maybe a=
=20
> gerrit hook similar to buildbot?) without having quite so many warnings=20
> on the development site.
>=20
> The git settings from https://wiki.openafs.org/devel/GitDevelopers/ are=20
> great, but a tool you can automate might lower the intimidation factor a=
=20
> bit.
Unfortunately, I don't think it would be practical to impose a new coding s=
tyle
on a large, legacy code base. It is difficult since there is a wide variat=
ion
of coding styles depending on the subsystem/module. For the most part, I t=
ry
to be consistent with the local coding style and lean on gnu indent with
the given .indent profile shown on the openafs wiki, since that was used to
reformat the tree at one point.
Best regards,
Mike
--=20
Michael Meffie <mmeffie@sinenomine.net>