[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code formatting discussion/proposal



On 06.07.2015 13:04, Erik Huelsmann wrote:
> Hi all,
>
> I'm going through our code quite randomly at the moment while
> investigating the multi-currency changes.
>
> What stands out at me is that we have:
>
>   * different indenting methods (tabs vs spaces)
>   * different intenting styles (2,  3, 4+ spaces)
>   * different widths: 80 on most files, but I've seen anything above too
>   * single vs double underscores as separators in tokens
>   * etc
>
> I'm sorry, but it's starting to disturb me (quite a bit). So, here's my
> proposal:

Without going through all of the replies yet, I'd like to recommend 
standing on some giant's shoulders with this and I mean using a standard 
that's maintained by a bigger body (this is always going to be in 
movement and requires attention) and has a well-maintained 
IDE-integration implementation available for fully automated checking 
and processing.

WordPress-based example:

https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/

which works on top of more generic PHP tokenizer system 
https://github.com/squizlabs/PHP_CodeSniffer/

I'm definitely never looking back towards anything weaker.

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel