>>> That's not in the CStyle guide. And I prefer my style.
>>
>> Perhaps it can be added there. But I don't think this is a matter of
>> style. It's just that the brackets are not necessary in this case.
> 
> If it's not in the official CStyle guide, how am I supposed to follow
> rules? Jiri complained about me not following them, but how can I know?

Well, some of the rules are not written down and are only implied as
most other developers use and/or enforce them. How you can learn about
these? Either by reading other people's code or by being asked for a
cstyle fix, as was the case with Jiri.

>>>
>>> CStyle guide reference?
>>
>> The majority of the rest of the code does that. It's usually better to
>> write code which follows the same, possibly implied, conventions. It's
>> also not clear to me whether not having the empty line there would not
>> result in Doxygen inappropriately joining the \brief and \description.
> 
> Well, as I pointed earlier (in another thread about me not following
> CStyle guide), there are places that break those rules already in
> mainline. You noted how some libraries still use "lib" in their file
> names, how there are USB error codes in errno.h and some deviations from
> license formatting.

Yes, in the past we were more lenient in this regard and always ended up
doing the clean-up after merge ourselves. But the party is over :-) We
also realized that some things represent a problem only after they made
it to mainline, such as the proliferation of error codes in errno.h.

> Don't take me wrong, but you can't expect me to follow rules, that are
> not written (please don't try to apply this statement to outside world).
> Would it be too much trouble to admit your rules are not complete and
> fix them and then politely asking me/other devs to correct the code to
> apply to the new rules, instead of arguing about it?

I think this is what actually happened. You have been asked by Jiri to
fix some issue, mostly without explanation from his side. He just asked
you to do it. And yes, as I already mentioned, the written rules are
incomplete and it takes some learning to learn the other ones. Welcome
to the club.

> The alternative is to accept some slight and reasonable deviations from
> your preferred style. I would prefer this route than the other, because
> it just is more "humane".

Deviations are by definition not tolerable, but there may be unregulated
areas.

>> You may have noticed that this very long e-mail (except for the
>> technical discussion at its end) is primarily about nitpicking your
>> deviations from the cstyle or from the style of the other code. I think
>> the cause which provokes an e-mail like this is rooted in contributors'
>> tendencies to make deliberate exceptions from various rules. It is easy
>> to say: "I don't like this and I'll do it my way, using my preferred
>> style." But it won't work in a multi-developer project like HelenOS. If
>> the contributors merely tried to comply as much as possible with the
>> rules, both written and implied, we could save ourselves some time. We
>> are being quite pedantic about it because it is clear that if the code
>> gets merged with cstyle issues, somebody will have to eventually fix
>> them and you can guess who that somebody will be. The other alternative
>> is that we end-up with as many cstyles as there are contributors, that
>> is: a complete chaos. If you think we are a sort of cstyle nazis, I
>> recommend you undergo a code inspection session or two in eg. Solaris
>> sustaining organization where exceptions from the cstyle are not
>> permitted at all.
> 
> 1) Why would you think I consider you CStyle nazis?

I don't think you do, I just wrote that for the case you really did.

> 2) I think I try to fix my code to your liking. You may notice that I'm
> just asking for other opinions on uncertain issues.
> 3) I'm not adding code to kernel or any other part (except for
> checksum.{c,h}) - I'm creating my own code from scratch. That lessens
> the issues to a certain degree.
> 4) If you consider only extreme ways and your way, the discussion is not
> worth it. I never said noone should ever follow any rules.

To me, this is just a process of asking you to resolve the cstyle
issues. Nothing personal. If we had the cstyle enforcing tool, you would
get the same message from that tool.

Jakub

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to