question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support //! and \param comments

See original GitHub issue

Our doxygen style is:

  1. CPP comment style
  2. doxygen marker: ! -> //!
  3. keywords with \ not with @
  4. Empty last line (when doxygen commit is more then 1 line): //!
  5. Same for c, cpp, h, hpp … files
  6. no \brief (aka AUTOBRIEF)

Example:

//! Creates a thread.
//!
//! This function creates a thread.
//!
//! \note Consult \ref C_Threads_Priorities for choosing an appropriate priority
//!       for your thread.
//!
//! \param[out] thread       Pointer to a thread_t variable. Will contain the thread handle after creation.
//! \param[in] name          Name of the thread to create
//! \param[in] priority      The Priority of the thread
//! \param[in] stackSize     The requested Stacksize
//! \param[in] entryPt       Ptr to the function to execute
//! \param[in] arg           argument given to the thread function
//! \param[in] joinable      if the thread should be joinable or not
//!
//! \retval #OK
//! \retval #ERR_ILLEGAL_OP
//! \retval #ERR_INVALID_ARG
//! \retval #ERR_OBJECT_NOT_FOUND  Unsupported priority
//! \retval #ERR_INTERNAL
//!
STATUS thread_create(thread_t* thread, const char *name, int priority,
                                    int stackSize, THREADFUNCPTR entryPt, void *arg, BOOL joinable);

I looked at all configuration options, and I think this is currently not possible. Am I right?

  1. You have examples with ///, but I do not know how i can trigger them myself.
  2. not configurable?
  3. not configurable?
  4. not configurable?
  5. thats probably default?
  6. can be done with: doxdocgen.generic.briefTemplate

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
KUGA2commented, Nov 23, 2021

Thank you for this nice response.

First of all, I need to to double slash the configs "doxdocgen.generic.paramTemplate": "\\param {param} ",. Easy fix 😃 Is still got a few issues. The result is:

//!
//! <cursor>
//! \param thread
//! \param name
//! \param priority
//! \param stackSize
//! \param entryPt
//! \param arg
//! \param joinable
//!
//! \retval
//!
STATUS thread_create(thread_t* thread, const char *name, int priority,
                                    int stackSize, THREADFUNCPTR entryPt, void *arg, BOOL joinable);

I think my colleges will be disturbed by the fact, that the cursor is in the line which is supposed to be empty.

Also, I think it would be great do have blank texts. Are there templates for brief and description? (Bonus feature: indention at X spaces!):

//! <brief description><cursor>
//! 
//! <detailed description>
//! 
//! \param thread <parameter description>
//! \param name <parameter description>
//! \param priority <parameter description>
//! \param stackSize <parameter description>
//! \param entryPt <parameter description>
//! \param arg <parameter description>
//! \param joinable <parameter description>
//!
//! \return <return value. use '\retval value description' for specific return values, e.g. with enums>
//!
STATUS thread_create(thread_t* thread, const char *name, int priority,
                                    int stackSize, THREADFUNCPTR entryPt, void *arg, BOOL joinable);
0reactions
KUGA2commented, Nov 29, 2021

There is also an issue with the file comments and my settings:

"doxdocgen.generic.briefTemplate": "<brief description>{text}",
"doxdocgen.generic.customTags": ["<detailed description>"],
"doxdocgen.generic.paramTemplate": "\\param[<in/out>] {param}{indent:32}<parameter description>",
"doxdocgen.generic.returnTemplate": "\\retval <value>{indent:32}<value description. Use \\return <descripton> when there are no specific values>",
"doxdocgen.c.commentPrefix": "//! ",
"doxdocgen.c.lastLine": "",
"doxdocgen.c.firstLine": "",
"doxdocgen.c.triggerSequence": "//!",
"doxdocgen.generic.order": [
    "brief",
    "empty",
    "custom",
    "empty",
    "tparam",
    "param",
    "empty",
    "return",
    "empty",
  ],
  // The order to use for the file comment. Values can be used multiple times. Valid values are shown in default setting.
"doxdocgen.file.fileTemplate": "\\file",
"doxdocgen.file.fileOrder": [
    "file",
    "brief",
    "empty",
    "custom"
],

This Results in: grafik

The custom (aka detailed) line is missing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write Doc Comments for the Javadoc Tool - Oracle
This document describes the style guide, tag and image conventions we use in documentation comments for Java programs written at Java Software, Oracle....
Read more >
Support descriptions for JS/TS param/return comments #1847
Motivation The generated JS and TS doc comments provide no descriptions for the parameters or return values. Some developers may want this ...
Read more >
Use JSDoc: @param
The @param tag requires you to specify the name of the parameter you are documenting. ... If you provide a description, you can...
Read more >
JSDoc Reference - TypeScript: Documentation
JSDoc Reference. The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >
Recommended XML tags for C# documentation comments
Partial classes are fully supported, and documentation information will be ... The <param> tag should be used in the comment for a method ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found