Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

check style: what to do with tab?

 
Amy Young
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo

I'm have done by now 90% of the application and I'm busy with minor issues like code style checking.
I download and installed the eclipse chekStyle plugin.
When activating it I saw a huge (really huge ) amount of messages like this:

'Tab chrachter: line contains a tab charachter'

Of course it does, I always use tabs to indent code. I checked on the SUN site : http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
and there it stated :

Four spaces should be used as the unit of indentation.


Is this really important??? Can anybody who passed the assignement tel me
if I could loose points when letting the code the way it is now?

Thanks

Amy
 
John Stone
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on assessor. I'm currently working on project (C/C++) with about 70 developers, some of them use tabs some spaces,.. some of them think tab is equivalent to 2 spaces/4 spaces/8 spaces and sometimes it is annoying to read/merge such files.
(But I guess it is less annoying then "^M")

It is not a problem to convert tabs to spaces in eclipse, but if you want use tabs then make sure it is consistent across all your files.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic