zjlyou / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

Uniformize code syntax #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

see http://code.google.com/p/openjpeg/wiki/CodingStyle

Original issue reported on code.google.com by antonin on 20 Feb 2012 at 4:22

GoogleCodeExporter commented 8 years ago
need to find a tool for indentation.

Original comment by mathieu.malaterre on 25 Feb 2014 at 4:01

GoogleCodeExporter commented 8 years ago
See r2554 for suggestion

Original comment by mathieu.malaterre on 3 Mar 2014 at 4:13

GoogleCodeExporter commented 8 years ago
Is it possible / a good idea to setup a post-commit hook (pre-commit hook are 
not allowed in GCode) to reformat the code if needed ? 

Original comment by antonin on 4 Mar 2014 at 9:37

GoogleCodeExporter commented 8 years ago
This issue was updated by revision r2723.

Original comment by mathieu.malaterre on 14 Mar 2014 at 9:08

GoogleCodeExporter commented 8 years ago

Original comment by mathieu.malaterre on 14 Mar 2014 at 2:05

GoogleCodeExporter commented 8 years ago

Original comment by mathieu.malaterre on 14 Mar 2014 at 2:05

GoogleCodeExporter commented 8 years ago
Could people comment on current coding style. See here: 
http://code.google.com/p/openjpeg/wiki/CodingStyle#Tabs

Original comment by mathieu.malaterre on 14 Mar 2014 at 2:06

GoogleCodeExporter commented 8 years ago
On my end,

I like tabs to be tabs. This allows anyone to see the code as they see fit with 
editor options for tab-size.
Tabs shall only be used at beginning of lines.
Multiline declarations shall use a mix of tabs and spaces. Tabs shall be used 
to enforce indentation as the first line. Spaces shall be used to extend 
indentation in order to align following lines. Small example using \t for tabs.

\tchar foo[3x3] = {
\t                           0, 1, 2,
\t                           3, 4, 5,
\t                           6, 7, 8,
\t                         };

These rules guarantee that everyone can see indentations the way they want & 
keep proper alignments.

Original comment by m.darb...@gmail.com on 30 Sep 2014 at 8:09