Web Development

A quick Doxygen fix for @type

Doxygen doesn’t recognize the @type docblock tag. That’s a problem, since at GravityView, we try to replicate WordPress core’s usage of the @type docblock tags to define nested values in associative arrays.

The fix? Add an ALIAS in Doxygen where @type is treated as @param. Here’s how:


Now, Doxygen will recognize your @type tags as it does @alias tags.

Where to find this setting in the Doxygen app

I use the Doxygen app rather than the command-line interface. Here’s where to find the setting:

  1. In the Topics sidebar, select Project
  2. Scroll down to ALIASES
  3. Click the plus (+) icon to add a new alias
  4. Type type=@param
  5. Click the arrows-in-a-circle icon just to be sure it took

Here’s what all my aliases look like:

Screenshot of ALIASES definition in the Doxygen app.

By Zack Katz

Zack Katz is the founder of GravityKit and TrustedLogin. He lives in Leverett, Massachusetts with his wife Juniper.