[Nfd-dev] Code formatter/beautifier
Alex Afanasyev
aa at CS.UCLA.EDU
Thu Nov 3 11:07:09 PDT 2016
The standard version of clang-format (at least as of year ago) allows only limited customization. Our current style not really expressable with clang-format rules (I did some patching that got closer, but still not the same: https://github.com/named-data-ndnSIM/ndnSIM/blob/master/.clang-format).
Potentially a good way of solving this problem is to select a more standard style (e.g., Google), which will make all the automation work.
--
Alex
> On Nov 3, 2016, at 11:47 AM, Junxiao Shi <shijunxiao at email.arizona.edu> wrote:
>
> Hi Nick
>
> I heard there are someone using clang-format, but I haven't heard anyone being able to create a clang-format configuration that ensures 100% compliance.
> Thus, I still recommend developers to memorize all style rules and ensure compliance the moment you type it.
>
> I heard from a Google engineer that they use Eclipse to ensure Google code style compliance. I'm unsure whether it's possible with ndn-cxx rules.
>
> ndnSIM has defined their rules in terms of a particular clang-format configuration, which could be a solution. However, relying on a tool as the rules is similar to defining a network protocol in terms of a specific implementation, which could cause inter-operability problems.
>
> Yours, Junxiao
> From: Nick Gordon
> Sent: 11/3/2016 11:36
> To: Junxiao Shi
> Subject: Code formatter/beautifier
>
> Junxiao,
>
> In an attempt to smooth out style issues, I intend to use a formatter.
> It appears that there is a well-known program, "clang-format", that does
> this. Do you have any system that you use to format your code that I
> should know about?
>
> -Nick
>
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
More information about the Nfd-dev
mailing list