Core should use "Implementation of hook_NAME()."

christefano - April 11, 2008 - 07:50
Project:Drupal
Version:7.x-dev
Component:other
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This patch updates the "Implementation of hook_NAME()." text in the code comments found in Drupal's core modules. Thanks to Morbus and chx for Drupal Tough Love, where I've learned that no coding style violation is too small to go unnoticed.

For the most part all I did here was add a period to end the line. "Implementation of hook_theme()" was the most common string missing a period.

Why do user.module and node.module sometimes include "Implementation of a Drupal action" in the code comments and not include the function name?

AttachmentSizeStatusTest resultOperations
core_code_comment_periods.patch5.95 KBIgnoredNoneNone

#1

Morbus Iff - April 11, 2008 - 11:35
Status:needs review» reviewed & tested by the community

I'd like to point out that most of these errors are the direct result of new hooks inside Drupal 6. It's just something that wasn't caught before, but it does indicate that core has been pretty careful about following the suggested guideline of a period at the end.

#2

catch - July 23, 2008 - 14:59
Status:reviewed & tested by the community» needs work

No longer applies.

#3

dmitrig01 - July 24, 2008 - 14:08
Status:needs work» needs review

Re-rolled

AttachmentSizeStatusTest resultOperations
core_code_comment_periods.patch8.12 KBIgnoredNoneNone

#4

Arancaytar - July 24, 2008 - 15:36
Status:needs review» reviewed & tested by the community

Looks like that takes care of all of them.

#5

Dries - July 24, 2008 - 16:25
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Yay.

#6

Anonymous (not verified) - August 7, 2008 - 16:32
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.