cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Zhang <Frank.Zh...@citrix.com>
Subject RE: Coding conventions, spaces and tabs
Date Fri, 22 Jun 2012 20:56:52 GMT
An annoying thing is Eclipse doesn't have a global setting for all instances, its setting is
per workspace. I wish I were wrong.
As I have multiple workspaces for various branches, it's easy to forget to configure the workspace
whenever I create a new one.

> -----Original Message-----
> From: Deepak Garg [mailto:deepak.garg@citrix.com]
> Sent: Friday, June 22, 2012 12:52 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: Coding conventions, spaces and tabs
> 
> +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"
> 
> 
> Thanks,
> Deepak
> 
> 
> -----Original Message-----
> From: Edison Su [mailto:Edison.su@citrix.com]
> Sent: Friday, June 22, 2012 10:56 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: Coding conventions, spaces and tabs
> 
> +1
> 
> > -----Original Message-----
> > From: Wido den Hollander [mailto:wido@widodh.nl]
> > Sent: Friday, June 22, 2012 9:38 AM
> > To: cloudstack-dev@incubator.apache.org
> > Subject: Coding conventions, spaces and tabs
> >
> > 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 = 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/    /g' {} \;
> >
> > I would want to try with the agent first and see how that works out,
> > later on we can fix other components like api, core and server.
> >
> > Objections? Suggestions?
> >
> > Wido
> >
> > [0]:
> >
> http://docs.cloudstack.org/CloudStack_Documentation/Design_Documents/
> C
> > o
> > ding_Conventions

Mime
View raw message