incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Battala <rajesh.batt...@citrix.com>
Subject RE: Coding conventions, spaces and tabs
Date Mon, 25 Jun 2012 19:15:27 GMT
How about this tool http://checkstyle.sourceforge.net/ 
This tool can be used as plugin in many editors. 

> -----Original Message-----
> From: Sheng Yang [mailto:sheng@yasker.org]
> Sent: Tuesday, June 26, 2012 12:07 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Coding conventions, spaces and tabs
> 
> On Sat, Jun 23, 2012 at 8:45 AM, Deepak Garg <deepak.garg@citrix.com>
> wrote:
> >
> >
> > -----Original Message-----
> > From: David Nalley [mailto:david@gnsa.us]
> > Sent: Saturday, June 23, 2012 1:27 AM
> > To: cloudstack-dev@incubator.apache.org
> > Subject: Re: Coding conventions, spaces and tabs
> >
> > On Fri, Jun 22, 2012 at 3:51 PM, Deepak Garg <deepak.garg@citrix.com>
> wrote:
> >> +1
> >>
> >>
> >> In Eclipse it is easy to configure the editor to replace 'tabs' with 'spaces'
> and also to kill the trailing whitespaces:
> >>
> >> To remove the trailing whitespaces on save:
> >>
> >> Preferences -> Java -> Editor -> Save Actions -> Configure Project
Specific
> settings -> (choose project) -> Configure -> Choose "Remove Trailing
> WhiteSpace"
> >>
> >>
> >
> >
> >>So not to be argumentative, but:
> >
> >>It may be easy, but that doesn't mean people will do 'The Right
> >>Thing', hence why there are so many coding convention problems in our
> >>codebase.
> >
> >>--David
> >
> >
> > One way to solve this problem is to have a script or may be something in
> unit tests which people can run locally on the entire codebase before
> pushing the code to the community. It can throw errors and point to such
> violations.
> > As developers have varied choices of their editors, so this will be a ground
> check for them before they push the code.
> > This is similar to how pep8 checks were used in Openstack unit test bundle.
> >
> 
> This is very useful, though it would require quite some time to develop it.
> 
> Linux kernel community also has a set of very good tools to help. For
> example everyone need to run checkpatch.pl before submit the patch.
> But that one is a ~4000 line script.
> 
> I think we need a volunteer for this? Or is there any tool we can borrow?
> 
> --Sheng
> >
> > Deepak
> >

Mime
View raw message