From owner-freebsd-hackers@freebsd.org Thu Mar 24 16:31:29 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 E84E6ADC153; Thu, 24 Mar 2016 16:31:29 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mail.ptrcrt.ch (gahr.cloud.tilaa.com [84.22.109.158]) (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 11DDB1764; Thu, 24 Mar 2016 16:31:28 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from webmail.ptrcrt.ch (www.gahr.ch [192.168.1.2]) by mail.ptrcrt.ch (OpenSMTPD) with ESMTPSA id db9388a3 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Thu, 24 Mar 2016 16:24:43 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 24 Mar 2016 17:24:43 +0100 From: Pietro Cerutti To: Matthew Seaman Cc: freebsd-hackers@freebsd.org, owner-freebsd-hackers@freebsd.org Subject: Re: Code Formatter for STYLE(9)? Organization: The FreeBSD Project In-Reply-To: <56F3FFB3.6070801@FreeBSD.org> References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> Message-ID: <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> X-Sender: gahr@FreeBSD.org User-Agent: Roundcube Webmail/1.1.4 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: Thu, 24 Mar 2016 16:31:30 -0000 On 2016-03-24 15:54, Matthew Seaman wrote: > On 2016/03/24 13: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 >> produce >> nothing usable. Same problem with astyle --style=bsd. >> > > pkg uses uncrustify with this config file: > > https://github.com/freebsd/pkg/blob/master/freebsd.cfg > > It's approximately what style(9) describes but doesn't cover things > like > sorting include files and I don't think it was updated in response to > the recent change allowing { brackets } around certain single-line > statements. It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp