On 15 February 2014 07:32, Erich E. Hoover erich.e.hoover@gmail.com wrote:
I'm not sure it's always clear what to do even the case of more experienced contributors, I've been taking a look at fixing a double unlock bug in RtlAcquireResourceExclusive ( http://source.winehq.org/source/dlls/ntdll/rtl.c#L157 ). And the style there indent-wise is so screwy that it's not clear what I should do in my patch. This one function currently has (level wise):
- Four space indents
- A tab indent + a space indent (in some cases just the tab)
- A tab indent + a five space indent (alternatively, 13 spaces)
- Two tabs + a space indent
So, what do I do? Do I just change line 190 to fix the bug and keep the two tab + a space indent? Do I fix just this line to conform to the standard since it's the only one I need to touch? Do I fix this one function because a lot of it doesn't conform to the standard?
Personally, in this specific case, I'd probably just change the single line, and replace the tabs with spaces there. In a module I'm more familiar with like wined3d I'd probably touch up slightly more. Except for reformatting the entire function, I doubt Alexandre would reject any of your approaches though, provided the patch is otherwise fine.
As for the original point of this thread, if Stefan spends considerable amounts of time explaining coding style to new contributors, perhaps it's worth the effort to maintain a page on the wiki, and point people to that instead.