Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D05C6D8E2 for ; Fri, 22 Jun 2012 16:50:37 +0000 (UTC) Received: (qmail 25283 invoked by uid 500); 22 Jun 2012 16:50:37 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 25257 invoked by uid 500); 22 Jun 2012 16:50:37 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 25249 invoked by uid 99); 22 Jun 2012 16:50:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 16:50:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of vijayendra.bhamidipati@citrix.com designates 66.165.176.63 as permitted sender) Received: from [66.165.176.63] (HELO SMTP02.CITRIX.COM) (66.165.176.63) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 16:50:31 +0000 X-IronPort-AV: E=Sophos;i="4.77,459,1336363200"; d="scan'208";a="199726445" Received: from sjcpmailmx01.citrite.net ([10.216.14.74]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 22 Jun 2012 12:50:10 -0400 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.73]) by SJCPMAILMX01.citrite.net ([10.216.14.74]) with mapi; Fri, 22 Jun 2012 09:50:08 -0700 From: Vijayendra Bhamidipati To: "cloudstack-dev@incubator.apache.org" Date: Fri, 22 Jun 2012 09:50:07 -0700 Subject: RE: Coding conventions, spaces and tabs Thread-Topic: Coding conventions, spaces and tabs Thread-Index: Ac1Qlo17iX1lf+60SBeaC/MVZKueFAAADmIw Message-ID: <93099572B72EB341B81A644E134F240B012F6CB7D42E@SJCPMAILBOX01.citrite.net> References: <4FE49F4E.5060101@widodh.nl> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 -----Original Message----- From: David Nalley [mailto:david@gnsa.us]=20 Sent: Friday, June 22, 2012 9:45 AM To: cloudstack-dev@incubator.apache.org Subject: Re: Coding conventions, spaces and tabs On Fri, Jun 22, 2012 at 12:37 PM, Wido den Hollander wrote= : > Hi, > > While working on CloudStack I noticed that a lot of files still use tabs > instead of spaces. > > I've been working on the agent mainly and there it seems bad. > > The coding convention [0] says: > > "Must indent with space not tabs. Indentation =3D 4 spaces" > > Now, I'm sure this is legacy, but would anybody vote against fixing this? > > A simple find + sed could fix a lot: > > $ find -name '*.java' -exec sed -i --posix -e 's/\t/ =A0 =A0/g' {} \; > > I would want to try with the agent first and see how that works out, late= r > on we can fix other components like api, core and server. > > Objections? Suggestions? > > Wido > > [0]: > http://docs.cloudstack.org/CloudStack_Documentation/Design_Documents/Codi= ng_Conventions A couple of comments - (and I don't know what infra's take on pre-commit hooks is, they may be verboten) Before this work started I'd like to see a pre-commit hook that rejects commits with tabs, so that we stop the problem. (I also want to see testing for line endings) Line endings and spaces are easy places to start from a coding convention requirement phase, and we can continue to build that up. Aside from that, I'd love to see this done. --David >> Sheng Yang sent me this useful link (that you put up) yesterday for thos= e using eclipse to work with the cloudstack codebase : http://docs.cloudsta= ck.org/Knowledge_Base/How_to_set_up_a_CloudStack_development_environment/Ec= lipse_profiles Regards, Vijay