Skip to content

Doxygen correction #9326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2019
Merged

Doxygen correction #9326

merged 1 commit into from
Feb 13, 2019

Conversation

hasnainvirk
Copy link
Contributor

Description

Adding to proper group so that the API doxygen appears into the class
hierarchy group rather than data strutures.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[X] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@melwee01 @AnotherButler

@ciarmcom
Copy link
Member

@hasnainvirk, thank you for your changes.
@AnotherButler @melwee01 @ARMmbed/mbed-os-pan @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team January 10, 2019 13:07
@melwee01
Copy link
Contributor

Afraid I don't really know this structural stuff in doxygen well enough to comment on it.

@hasnainvirk
Copy link
Contributor Author

@melwee01 There are no structural changes here. Adding to a group merely forces the doxygen for these files to appear under Class Hierarchy rather than data structures.

Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few questions:

  • Could you explain the reason of the change ? Entities we wanted in the NFC group where enclosed into an addtogroup command; now it includes everything that is declared in the file (including namespaces) which is not always what we want.
  • What description comment doxygen pickup when it encounters these addtogroup statement ?
/** @addtogroup NFC
  * NFC Controller
  * @{
  */

// then 

/** @addtogroup NFC
  * NFC EEPROM
  * @{
  */

There is two very different comment for the same group: NFC Controller and NFC EEPROM. What is rendered ?

@@ -14,6 +14,10 @@
* limitations under the License.
*/

/** @addtogroup NFC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous addtogroup command hasn't been removed.

@hasnainvirk
Copy link
Contributor Author

@pan- It says that the following file is under a group NFC and the module description is given in the next line. I am not sure why the previous format did not get parsed correctly by doxygen and that's why the documentation of NFC content went to the data structure section. Using the new format places it correctly under class hierarchy section. You can test it locally

doxygen doxyfile_options 2>&1 | grep features/nfc*

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 16, 2019

@ARMmbed/mbed-os-pan Pls review

Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it locally and the results are not good:

  • There is now two NFC modules: Nfc and NFC.
  • Data structures impacted by this PR does not appear in their module.
  • Additional text added in each addtogroup directive yield nonsense.

screenshot 2019-01-23 at 14 15 44

To document files, use the @file directive must be used.

@cmonr
Copy link
Contributor

cmonr commented Feb 12, 2019

@hasnainvirk Thoughts?

@hasnainvirk
Copy link
Contributor Author

@pan- @cmonr Sorry for late response. @pan- Added corrections as you suggested. Please let me know if the changes are fine with you. Please feel free to commit directly to the PR fork if you think there is something missing, I am not familiar with these APIs.

@@ -1,6 +1,8 @@
/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
*
* @file NFCController.h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not going to do anything as it is not part of a Doxygen comment. The same is true for other headers modified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pan- \file or @file [] should be standard doxygen specifier. Do you mean that there is some option that we need to turn on while generating doxygen in the doxy options file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I have seen many examples where file description is added alongwith license text. I can try to add a separate doxy section for @file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hasnainvirk I'm not saying @file isn't a valid directive. I'm just pointing out it should be part of a Doxygen comment. A doxygen comment starts with /**, /*!, /// or //!. In this case the licence documentation block starts with /*

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted the license block instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pan- Yeah, figured that out while you were writing your message :)

Adding to proper group so that the API doxygen appears into the class
hierarchy group rather than data strutures.
@cmonr
Copy link
Contributor

cmonr commented Feb 12, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Feb 13, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@cmonr
Copy link
Contributor

cmonr commented Feb 13, 2019

@ARMmbed/mbed-docs Heads up, doxygen change coming into 5.11.

@cmonr cmonr merged commit e84319f into ARMmbed:master Feb 13, 2019
@pan-
Copy link
Member

pan- commented Feb 13, 2019

@cmonr Why did you merge it ? It hasn't been approved by the pan team.
The last fix is wrong as the documentation of the file will be the licence...

If you want to add a documentation block about the file the pattern must be:

/*
 * LICENCE .....
 */

/** 
 * @file <Filename> 
 * <Description>
 */

<File content>

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 13, 2019

@hasnainvirk can you please fix it?

@hasnainvirk
Copy link
Contributor Author

@pan- Does it matter ? I am not 100% but it shouldn't matter. Most of the public code would have \file \detailes \brief in the license text.

@pan-
Copy link
Member

pan- commented Feb 13, 2019

I'm sure it does matters if you look at the rendered documentation:

screenshot 2019-02-13 at 13 40 17

screenshot 2019-02-13 at 13 42 36

Does that looks good ?

@hasnainvirk
Copy link
Contributor Author

@pan- #9709 Please have a look at the fix.

@cmonr
Copy link
Contributor

cmonr commented Feb 13, 2019

My mistake @pan-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants