Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-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 7853ADEF1 for ; Tue, 21 May 2013 10:46:48 +0000 (UTC) Received: (qmail 14156 invoked by uid 500); 21 May 2013 10:46:47 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 13804 invoked by uid 500); 21 May 2013 10:46:47 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 13744 invoked by uid 99); 21 May 2013 10:46:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 10:46:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasonmpell@gmail.com designates 209.85.215.47 as permitted sender) Received: from [209.85.215.47] (HELO mail-la0-f47.google.com) (209.85.215.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 10:46:39 +0000 Received: by mail-la0-f47.google.com with SMTP id fq12so490121lab.20 for ; Tue, 21 May 2013 03:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=2iZqD2GeSKUq2OFLETvB+hGQNMAGL1tDeG/BO88UFYY=; b=tFky8esCnsXBYux3/YB/Tg1I9G7s//FTHzVil9/QJZ4t+Ck1tB0tuSMYtlMd3JpFBU 943ia2y5yX3mkXcqwwrZWWX3ttFnL3Iy+TPlMwNV9P1PkVKDv4fw0Tnr16cwCOetbu5l w6mfkDSyBXzhtOjYlbinGjt6A+y3ajAUWyVkjhtbu1gasNvN5F+Ddqkdm9iw0eiMbmOO F+cQlAta7ZOKhNlvttAx06SqIKi5HO+6MFE+c3yoD68wccdzVy2iiOjWwHmYqvB4m4lH plGRyiItz5GWan/1dfld8fMpCwqS0aqQPzDiSMmKkIPf+KRPa0v2Gvn01mpoKFjAcugs ITCA== MIME-Version: 1.0 X-Received: by 10.112.20.234 with SMTP id q10mr1266517lbe.15.1369133176970; Tue, 21 May 2013 03:46:16 -0700 (PDT) Sender: jasonmpell@gmail.com Received: by 10.152.124.168 with HTTP; Tue, 21 May 2013 03:46:16 -0700 (PDT) In-Reply-To: <519B4032.7020108@gmail.com> References: <519B2A46.40105@die-schneider.net> <303455001.451369128519819.JavaMail.root@shefa> <519B4032.7020108@gmail.com> Date: Tue, 21 May 2013 20:46:16 +1000 X-Google-Sender-Auth: H590psZwTF_yT-pLDuv2iygN2FE Message-ID: Subject: Re: Code style From: Jason Pell To: dev@cxf.apache.org Content-Type: multipart/alternative; boundary=14dae93d9348a9e65b04dd38283c X-Virus-Checked: Checked by ClamAV on apache.org --14dae93d9348a9e65b04dd38283c Content-Type: text/plain; charset=UTF-8 since checkstyle enforces 120 already, it would seem sensible to keep with that, otherwise if you go for 110 or 100 there are likely to be a heap of build breaks. On Tue, May 21, 2013 at 7:36 PM, Sergey Beryozkin wrote: > Hi Amichai > > On 21/05/13 10:28, A. Rothman wrote: > >> >> I'm glad you brought styling up for discussion, since there are various >> inconsistencies in the current code base: >> >> - Line lengths are indeed one issue I've noticed - I'd go for 120 chars >> per line as well, though it's not as important as being consistent. >> There are currently lines that are broken also at less than 100 chars, >> at awkward places, for no apparent reason. >> >> - Whitespace: there are currently places where tabs are used for >> indentation instead of spaces, as well as many trailing spaces (which >> were introducing many artificial diffs in patches I submitted). >> >> - There are occasional blank lines added at unhelpful locations, e.g. >> before the closing brace of a method, or between two closing braces of >> two nested blocks. >> >> - Some method definitions have parameter lists stacked with one >> parameter per line with a common left-aligned margin, whereas others use >> regular line-continuation rules and indentation (I personally much >> prefer the latter). >> >> - Inconsistent naming of variables, even of the same type and meaning in >> very adjacent code. >> >> - while javadocs are mostly missing, also the existing ones often don't >> conform to the standard javadoc conventions. >> >> - Various other inconsistencies I can't remember at the moment, but >> which made review and work on the code harder for a newcomer (and would >> make maintenance harder and more error-prone for existing devs as well). >> >> It would be great to do a one-time sweep and fix all the existing >> inconsistencies and respective rules, once the standard is decided upon, >> and to better enforce them in the future. >> > > This is the result of the DOSGi codebase having no style enforced at all, > I'd suggest to copy the CXF rules there > > Hi Christian: IMHO the longer the lines the more difficult they are to > read, though I guess much depends on the screen resolution and how many > editors are open :-), etc... I probably don't mind if it's 110 or 120 > limit, I'd try to keep it within 100 anyway :-) > > Sergey > > >> Disclaimer: I'm new here, and haven't reviewed the entire CXF code base, >> but focused mainly on the DOSGi subproject, so I don't know how much of >> this applies elsewhere. >> >> Christian - could you please also add a link to the checkstyle/pmd rules >> in the guidelines page? >> >> Amichai >> >> On 05/21/2013 11:03 AM, Christian Schneider wrote: >> >>> Hi all, >>> >>> at the moment our rules for code styles are a bit hidden. When Amichai >>> asked me about the rules at the CXF code base it took me some time to >>> find the >>> formatter for eclipse. I added a link to the Coding Guidelines in the >>> wiki. https://cwiki.apache.org/**confluence/display/CXF/Coding+** >>> Guidelines >>> >>> When I checked it I found that the code formatter sets the line length >>> to 110 characters while the checkstyle rule checks for 120 characters. >>> I think we should set the same count for both rules. >>> >>> Which do you prefer? >>> >>> I favour 120 characters. >>> >>> Christian >>> >>> Btw. the checkstyle rules are here: >>> http://svn.apache.org/repos/**asf/cxf/build-utils/trunk/** >>> buildtools/src/main/resources/**cxf-checkstyle.xml >>> >>> >>> >> >> > --14dae93d9348a9e65b04dd38283c--