Coding Standards

niden.net

Member
I tried posting this in the Developer Resources but I could not. If the mods see fit to move this topic please do.

My question is whether there is or there will be a coding standards document that xenForo uses and xenForo modifications should abide to. I understand that it will be difficult to 'police' this when more and more modifications/plugins start rolling in, but it does set the tone and does help in the long run.

One small example that I can give you is the use of tabs vs. spaces on code written in plugins. Also what is the default tab? 4 spaces or 8?

Something like that would help IMHO.
 
Well, I think he confused tabs with line breaks, which can very well vary (\n versus \r\n).

I haven't read about any OS which handles tabs (0x09 hex code) in any different way.
And if there's one, I'm yet to see any religious war thread "discussing" it. :D
 
Actually I did not confuse them with line breaks. I meant tabs. They are a function of the IDE as some have posted but it is also a matter of OS. I have seen numerous times files saved on my Windows system to be horribly indented when opened in Linux. This is one of the reasons that one uses spaces vs. tabs.

Thanks again for the links.
 
Top Bottom