On Sun, May 05, 2013 at 04:04:44PM -0400, Ehsan Akhgari wrote: > clang-format is a source code formatting tool developed by Google which can > do automatic whitespace cleanup, vertical alignment and line breaking > changes to C++ code. See this video [1] for a recent presentation about > the tool in the LLVM Developers Conference (the slides are here [2]). And > it currently integrates with vim, emacs and TextMate. > > I just gave it a shot in vim and the results look very good. For some > things it can analyze the source code in the current file to derive what > the current style used in the file is in order to improve style consistency > per file. It also currently support three coding styles, Google, LLVM and > Chromium. I submitted a patch to add a Mozilla coding style [3] and once > that's committed, you can try it out. > > It would be great if people can try it out and see if they like the > results, and start using it to improve our code. Also, we can adjust it to > support more coding style options if needed in order to improve handling of > the Mozilla specific idioms. > > [1] http://llvm.org/devmtg/2013-04/videos/jasper-hires.mov > [2] http://llvm.org/devmtg/2013-04/jasper-slides.pdf > [3] > http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130429/079226.html
Relatedly, there was a poster at the conference about Code Editing in Local Style, which is able to move variable declarations, and do other higher level coding style changes. https://bitbucket.org/PEConn/cels Mike _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

