-
Notifications
You must be signed in to change notification settings - Fork 3k
Doxygen for source #5213
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
Doxygen for source #5213
Conversation
Add add documentation to the second parameter of handle_open_errors. This is in preparation for turning on doxygen for source files.
Turn on doxygen for .c and .cpp files. Ignore the source directories in frameworks, as several of these files contain doxygen errors.
Turn on doxygen for tests. This allows testing functions to be referenced, which will be used for various parts of the HAL specification.
cfaa34a
to
10985ee
Compare
/morph test |
1 similar comment
/morph test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not certain about source files doxygen, it is in most cases they contain internal detail - implementation specific - should this be generated?
Could you explain what are the benefits of these changes ? |
Why do we want to do that? Can we put all porting/implementation relevant documentation only in API headers and the porting guide? |
If the HAL specification is going to reference the test functions which validate defined behavior then these functions need to be in doxygen somewhere. This could be:
Several people seemed to be against option 1 of having dedicated test header files and I don't think that filling the API header with a lot of test function prototypes (option 2) would be any better. This leaves option 3, which is why I created this PR to turn on doxygen in the test directory. If you know of any other option, or think it is unreasonable to reference the test functions from doxygen, please let me know. There isn't must of a downside to building doxygen for source files. If you don't explicitly add it to a group it won't effect mbed-os's doxygen. Additionally, CI will be able to catch incorrectly formatted doxygen in source files. If you have concerns with how doxygen will look because of this change, I highly recommend that you build doxygen for yourself and take a look. To do this run doxygen (as shown below) from the mbed-os directory and open
|
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Ok, I think I misunderstood your goal before, sorry for that! I'm not against having test headers, actually they makes it easier to see what we actually test, when the test cases are not mixed with the test code. I'm ok with referencing test cases in HAL specification, as long as they don't provide more information required to complete the port. What I don't want to have is yet another source of porting information, that can go out of sync, PG and the HAL headers are enough. They should contain all the require informations and details necessary to successfully port mbed OS. We can quote tests that validate each of the assertions I'm fine with that. |
I would also consider those 2 (1st or 3rd). What others think, green or red for this? @bulislaw @pan- @deepikabhavnani @maciejbocianski @fkjagodzinski |
Header file approach is used instead of source in mbed-os, so I would say let us stick to that and add test headers separately. But API headers and test header should not be mixed. |
Approach 3, test function doxygen in source in #5008 @bulislaw, @0xc0170, @deepikabhavnani please let me know what you think of the two alternative implementations (or if you have other ideas). Some pros of having doxygen run on source files:
Some cons of having doxygen run on source files:
|
Personally I like the 3rd option. The simpler the better -- test headers look like an overhead for me. |
I would vote for 1st (consistency with mbed-os). |
I don't have strong preferences, but I think having a test plan in headers make it easier to read as it adds separation from test code. So I would vote for the 1st. |
I will go with approach 1 |
I created #5238 to include doxygen for test directories and enable approach 1. Any preferences on if doxygen should be turned on for source? If this isn't a desirable feature then I'll close this PR. |
I don't think we need this changes. |
Generate doxygen for source file in addition to header files. Also generate doxygen for tests.