From owner-freebsd-hackers@freebsd.org Tue Mar 29 12:45:08 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D638CAE082C for ; Tue, 29 Mar 2016 12:45:08 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (mail.embedded-brains.de [82.135.62.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 879081D10 for ; Tue, 29 Mar 2016 12:45:07 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id F038C2A1835; Tue, 29 Mar 2016 14:45:00 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PHfRDGqy6B_E; Tue, 29 Mar 2016 14:44:58 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 851B52A1858; Tue, 29 Mar 2016 14:44:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TDKvmJT_p-Dh; Tue, 29 Mar 2016 14:44:58 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 613EB2A1835; Tue, 29 Mar 2016 14:44:58 +0200 (CEST) Subject: Re: Code Formatter for STYLE(9)? To: Hans Petter Selasky , freebsd-hackers@freebsd.org References: <56F3EBB1.1060603@embedded-brains.de> <56F44D23.6090405@selasky.org> From: Sebastian Huber Message-ID: <56FA78C8.9000105@embedded-brains.de> Date: Tue, 29 Mar 2016 14:44:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56F44D23.6090405@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 12:45:08 -0000 On 24/03/16 21:25, Hans Petter Selasky wrote: > On 03/24/16 14:29, Sebastian Huber wrote: >> Hello, >> >> is there a ready to use C code formatter available that honours >> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, >> Chromium, Mozilla by default. The GNU indent --original seems to produ= ce >> nothing usable. Same problem with astyle --style=3Dbsd. >> > > Hi, > > Maybe you want to contribute to: > > https://svnweb.freebsd.org/base/head/tools/tools/indent_wrapper > > It also supports diffs.=20 I tried to use the FreeBSD indent with your configuration on a pretty=20 badly formatted file, but it didn't work well. My hope was that someone=20 has a configuration for the clang-format. The uncrustify program seems to be quite capable, but would require=20 additional support to cope with STYLE(9). At least using https://github.com/freebsd/pkg/blob/master/freebsd.cfg didn't yield a good result. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=E4ftliche Mitteilung im Sinne des EHUG.