cpp:CommentedCode on doxygen blocks


(Martin Quinson) #1


the rule cpp::CommentedCode gets triggered on the examples we have in the code blocks in doxygen. Here is an example:


It reads as follows:

/** @brief A C++ compatible [TrivialClock](http://en.cppreference.com/w/cpp/concept/TrivialClock) working with simulated-time.
 * Blah blah blah blah
 * @code{cpp}
 * using namespace std::chrono_literals; 
 * simgrid::s4u::actor::sleep_for(42s);
 * @endcode

Of course there is some commented code in the examples of code we put in the documentation.

Thanks again for your great tool,

(Martin Quinson) #2

The same kind of problem also occurs with cpp:S1103 (don’t mix /* and //), as here:

/** Result of some (probably) asynchronous operation in the SimGrid kernel
 * Blah blah bla
 * Example of the API:
 *  <pre>
 *  // Create a new process using the Worker code (returns a std::string)
 *  simgrid::kernel::Future<std::string> future =
 *     simgrid::kernel::createProcess("worker42", host, Worker(42));
 *  // At this point, we just created the process so the result is not available.
 *  </pre>

Do you prefer me to open two topics when I have two problems that look similar to me, or it’s OK to open only one topic as I did?

Thanks for this incredible service,

(Massimo Paladin) #3

Hi @mquinson,

we do plan to revisit C/C++ comment detection strategy, thank you for your feedback, we will keep in mind your reports while revisit. I cannot provide you with an ETA, you can follow the related ticket: CPP-104, the ticket was created a long time ago but we plan to look at it in a short time future.

(Martin Quinson) #4

Hi @mpaladin, thanks for considering this bug.

There is absolutely no urgency nor need for an ETA from my side. I’m a happy user of the sonarcloud for Open Source projects program. I feel like I’m paying my part with this feedback, but I can definitely live with this issue.

Thanks for all,

(Massimo Paladin) #5

Thank you for your good feedback @mquinson!