This crops up periodically... The line

@defgroup updates-7.x-to-8.x Updates from 7.x to 8.x

gets copied from system.install to other .install files.

It appears that it is currently in toolbar.install and shortcut.install.

That is not good. They should have @addtogroup instead of @defgroup.

See
http://drupal.org/node/1354#groups
for details of syntax.

So this project is:
a) Find all instances of @defgroup updates-7.x-to-8.x in core
b) Make sure there is just one (probably the one that I think is in system.install) by changing the others to @addtogroup.
c) Maybe put a code comment just before the @defgroup documentation block in system.install telling people NOT TO COPY that @defgroup block any more. Please. Politely. :)

Should be a good Novice project.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chrisjlee’s picture

Try this? I hope the message was friendly enough.

chrisjlee’s picture

Status: Active » Needs review
FileSize
1.44 KB

Oops left some trailing whitespace. Try again. also need to change status...

Status: Needs review » Needs work

The last submitted patch, 1899460-duplicate-defgroup-2.patch, failed testing.

chrisjlee’s picture

Status: Needs work » Needs review
FileSize
1.44 KB

not sure why it failed. I guess i'm making this more complicated than it is. try again.

Status: Needs review » Needs work
Issue tags: -Novice

The last submitted patch, 1899460-duplicate-defgroup-3.patch, failed testing.

chrisjlee’s picture

Status: Needs work » Needs review
Issue tags: +Novice

#4: 1899460-duplicate-defgroup-3.patch queued for re-testing.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! But what I'd actually like to happen:
a) Change the two @defgroup sections to @addtogroup (they don't need that comment).
b) Put a // comment before the @defgroup **in system.install** that says not to copy the defgroup to other files, and to use @addtogroup instead.

I don't think we've had problems with @addtogroup sections being changed to @defgroup. I think we've had problems where people have copied an existing @defgroup from system.install. At least, that is what I think is happening...

richard.c.allen2386’s picture

Status: Needs work » Needs review
FileSize
1.71 KB

Tried re-rolling the patch. Is this what you are looking for? Let me know if there is something funny, first core commit.

jhodgdon’s picture

Status: Needs review » Needs work

Looks great, thanks! Somehow an extra line got added to the defgroup documentation block in system.install though. If you can get rid of that, I think we'll be done.

richard.c.allen2386’s picture

Yup somehow it got added in there. Here you go.

richard.c.allen2386’s picture

Status: Needs work » Needs review

Forget to set issue.

jhodgdon’s picture

Status: Needs review » Needs work

Oh wait... I just noticed one other thing. When we do a @defgroup, we have to put in a human-readable name for the topic, and then a longer description. @addtogroup should not have this information. The proper syntax is just:

/**
* @addtogroup group_identifier
* @{
*/

and then a blank line, and then the function docs/definitions should follow. See
http://drupal.org/node/1354#groups

richard.c.allen2386’s picture

Status: Needs work » Needs review
FileSize
1.63 KB

I'm learning the doxygen stuff now so I think this is what you meant?

jhodgdon’s picture

Status: Needs review » Needs work

Just about! Here's what you currently have:

/**
  * @addtogroup updates-7.x-to-8.x
  * @{
  * Update functions from 7.x to 8.x.
  */

That last line with the description ("Update functions ...") also needs to be removed. Thanks!

chrisjlee’s picture

Status: Needs work » Needs review
FileSize
1.64 KB

Like that? Sorry i misunderstood before.

jhodgdon’s picture

Status: Needs review » Fixed

Thanks! That's it exactly. Committed to 8.x.

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