Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 675726B11 for ; Mon, 16 May 2011 07:54:45 +0000 (UTC) Received: (qmail 60113 invoked by uid 500); 16 May 2011 07:54:45 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 60029 invoked by uid 500); 16 May 2011 07:54:44 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 60020 invoked by uid 99); 16 May 2011 07:54:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 May 2011 07:54:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of maurizio.cucchiara@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-px0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 May 2011 07:54:36 +0000 Received: by pxi15 with SMTP id 15so2954299pxi.33 for ; Mon, 16 May 2011 00:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=FYmoJYcVhwISyUBf//idtjSZN4o1TINJkTMRl0aDKmE=; b=n5UXxgpwG3F8K00sEKOqZdcrc/aKTefTeTb5n4VSksz4zDFCqE29nrpmheS+G6uM7f 0p7CBssO3bOS2LXaG8xIfKzLzvzH4vzO0kJKzSQAPY0u38xIgS18Oh3DRvFs4lfVh8OC /UubCBiiHIdzRjPEFHn1F2ypdSymkqx8i56wA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=sCCY8YUy4UUbHLZfM7KqkcMwk8QP2/YCfy5V9OeL8fVN1SNjIloRaAT/ZfrF3BW2vm tJmuS8TNyolKrtnLtc4MhbrpJMd94XlK3mbeJSudxnuZJnCgXqca9aG38WrRBzPN9Dd/ crKxJUM5ryy4g8j2iMc82bhy/PvGHzyzZPtz8= MIME-Version: 1.0 Received: by 10.142.140.8 with SMTP id n8mr2607595wfd.214.1305532454864; Mon, 16 May 2011 00:54:14 -0700 (PDT) Received: by 10.142.44.2 with HTTP; Mon, 16 May 2011 00:54:14 -0700 (PDT) In-Reply-To: <4DD04D59.8030308@gmail.com> References: <4DD04D59.8030308@gmail.com> Date: Mon, 16 May 2011 09:54:14 +0200 Message-ID: Subject: Re: [OGNL] code style From: Maurizio Cucchiara To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Phil probably hit the nail on the head: contributors might have problem to incorporate patches, the main risk is that every patch contain a lot of noise and it's not good for the sake of reviewing. I have no problem with most of the conventions (which are the default settings of IntelliJ IIRC). The only one that I don't like so much is the new line brace. It take me back to 1990 when I used to code in C. What about if we put to the vote it between ognl committers? On 16 May 2011 00:02, Phil Steitz wrote: > On 5/15/11 2:44 PM, Konstantin Kolinko wrote: >> 2011/5/14 Simone Tripodi : >>> Hi all guys, >>> OGNL code is formatted using a mixture of various styles, I hope >>> everybody agrees on adopting one unique style. >>> I propose to adopt the Maven Style[1] that is already widely adopted >>> and supported by IDEs. >>> Thoughts? Objections? If agree I would quickly proceed, just let me kno= w! >>> SImo >>> >>> [1] http://maven.apache.org/developers/conventions/code.html >>> >> -0 (not binding) >> >> 1. "Blocks: Always enclose with a new line brace." wastes lines if you >> want to print the sources. >> >> 2. "White space: One space after control statements and between >> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz >> ) instead of myFunc(foo,bar,baz))." >> >> I think that is ugly. Is there a reason behind this? >> >> 3. "Line wrapping: Always use a 120-column line width for Java code >> and Javadoc." >> >> Line width of 120 is likely cause line wrapping when diffs are send >> through e-mail and problems when doing side-by-side comparison. I am >> not so worried about Java code, as lengthy statements are rare, but >> more about Javadoc. >> >> My personal preference is "Java conventions", but with spaces instead of= tabs. >> >> Are there any projects in Commons that already use the "Maven" style? > > I don't think so. =A0I agree with your comments, Konstantin, as do > most current Commons sources. =A0Our convention here is that > components maintain their own checkstyle configs and those actively > working on components determine how they want the sources to look. > So it comes down to a question for the [ognl] committers to decide. > One point to consider is that strange settings (and I would > personally call at least 1 and 2 above "strange") may make it harder > for new contributors to get involved and for committers to evaluate > and incorporate patches. > > Phil >> >> Best regards, >> Konstantin Kolinko >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --=20 Maurizio Cucchiara --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org