[development] QA: Consensus on comment formatting

Rob Barreca rob at electronicinsight.com
Mon Jan 8 18:39:54 UTC 2007


>
> for phpdoc // @todo wouldn't work...  /** @todo would word */
Most IDEs recognize

// TODO: Whatevs.

as valid todos. So for inline todos, those seem the way to go. For 
Doxygen, you're right that we should definitely use @todo. Are you 
suggesting that we use /* @todo */ for inline todos as well and Doxygen 
will pick up on those?

Rob Roy Barreca
Founder and COO
Electronic Insight Corporation
http://www.electronicinsight.com
rob at electronicinsight.com



Darrel O'Pry wrote:
> On Mon, 2007-01-08 at 10:43 -0500, Angela Byron wrote:
>   
>> Excellent! Thanks for the summary, Derek!!
>>
>>     
>
> <snip />
>
>   
>> Now, just one (technical) question.
>>
>> Does this:
>>
>>
>>     
>>>   // @todo These queries are very expensive, see http://drupal.org/ 
>>> node/105639.
>>>
>>>       
>> ...actually work and get parsed by doxygen?? I thought doxygen only  
>> worked on function headers. This would make @todo less useful, imo,  
>> since:
>>
>>      // TODO: this can be an expensive query. Perhaps only execute it  
>> every x minutes. Requires investigation into cache expiration.
>>      if ($user->uid) {
>>        db_query("UPDATE {users} SET access = %d WHERE uid = %d", time 
>> (), $user->uid);
>>      }
>>
>> Tells me that the queries immediately following that line are  
>> expensive, vs.
>>
>> /**
>>   * Reads a session variable.
>>   *
>>   * @todo the update query used here can be expensive....
>>   */
>> function sess_read($key) {
>>
>> Anyone know?
>>     
>
> for phpdoc // @todo wouldn't work...  /** @todo would word */
>
>   
>> Also, as Robert brought up, // TODO, etc. have support in IDEs (Zend,  
>> etc.). Can someone check if @todo does as well?
>>
>> -Angie
>>
>>
>>     
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070108/cf5bd534/attachment-0001.htm 


More information about the development mailing list