kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #37571
Re: Code style autoformat
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Kevin Cozens <kevin@xxxxxxxxx>
-
Date:
Sat, 22 Sep 2018 09:09:41 -0400
-
In-reply-to:
<1701957.VTFxoyfPGu@zgyarmati-thinkpad-w530>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
On 2018-09-22 07:18 AM, Zoltan Gyarmati wrote:
As Seth (rightfully) pointed out, my patch didn't fully follow the coding
guidelines. Before i started to manually fix the issues, i looked whether
there is any infrastructure for autoformatting in the source tree, and i
found:
* a clang-format config file (_clang-format)
* an uncrustify config file (uncrustify.cfg)
* a script for checking code style in changed files (tools/checkcoding.py)
[snip]> So my questions are:
* Is there any canonized ruleset for autoformatting the code?
I don't know if there is any official ruleset for use with auto-formatting
code. FWIW, there is one program that I've used to format (mostly C) code
that wasn't mentioned. The program is called indent.
Out of the box indent may not format the code the way you want it to appear.
It has a lot of options, that you can put in to a file, which allow you to
customize how it will reformat code.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ | "Nerds make the shiny things that
https://www.patreon.com/KevinCozens | distract the mouth-breathers, and
| that's why we're powerful"
Owner of Elecraft K2 #2172 |
#include <disclaimer/favourite> | --Chris Hardwick
Follow ups
References