Skip to content

[DOC] Update doc comments to pass -WDocumention check - #3375

Merged
marcalff merged 31 commits into
open-telemetry:mainfrom
zurex:fix/doc_comment_api
Jun 5, 2025
Merged

marcalff merged 31 commits into
open-telemetry:mainfrom
zurex:fix/doc_comment_api

Conversation

@zurex

@zurex zurex commented Apr 23, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #3370

Changes

  • Update doc comments to compile with -Werror -Wdocumentation

This reduces the number of documentation warnings.
Enforcement in CI to be implemented separately.

@zurex
zurex requested a review from a team as a code owner April 23, 2025 15:08
@zurex zurex changed the title Update all the doc comments and add WDocumention [DOC] Update all the doc comments and add WDocumention Apr 23, 2025
@netlify

netlify Bot commented Apr 23, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 5f26a2d
🔍 Latest deploy log https://app.netlify.com/projects/opentelemetry-cpp-api-docs/deploys/684053f104d673000812a054

@codecov

codecov Bot commented Apr 23, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.89%. Comparing base (470f66b) to head (5f26a2d).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3375      +/-   ##
==========================================
+ Coverage   89.88%   89.89%   +0.02%     
==========================================
  Files         212      212              
  Lines        6942     6942              
==========================================
+ Hits         6239     6240       +1     
+ Misses        703      702       -1     
Files with missing lines Coverage Δ
.../include/opentelemetry/common/key_value_iterable.h 100.00% <ø> (ø)
...ude/opentelemetry/common/key_value_iterable_view.h 100.00% <100.00%> (ø)
...pi/include/opentelemetry/context/runtime_context.h 97.60% <ø> (ø)
api/include/opentelemetry/logs/event_logger.h 90.00% <ø> (ø)
...lemetry/exporters/memory/in_memory_span_exporter.h 80.96% <100.00%> (ø)
...rs/memory/src/in_memory_metric_exporter_factory.cc 100.00% <ø> (ø)
...clude/opentelemetry/sdk/common/atomic_unique_ptr.h 100.00% <ø> (ø)
sdk/include/opentelemetry/sdk/trace/recordable.h 64.71% <ø> (ø)
sdk/include/opentelemetry/sdk/trace/sampler.h 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread CMakeLists.txt Resolved

@psx95 psx95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR!

Left some comments.

* be called when got a CURLMSG_DONE.
*
* @param code
* @param code CURLcode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks incomplete ?

@ThomsonTan

Copy link
Copy Markdown
Contributor

If the current format does break -Werror -WDocumention, it will also be good to add a CI pipeline with both option enabled, to ensure we have all the issues fixed and also guard future regression on it.

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the cleanup.

See preliminary comments on generated code.

@marcalff

Copy link
Copy Markdown
Member

Related:

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the cleanup PR.

Please remove all changes done on generated code for semantic conventions.

If there are unresolved doxygen issues, this is fine, the CI will need to wait longer before enforcing -Wdocumentation in maintainer mode.

Cleanup work (speaking from experience with warning cleanup, include-what-you-use, ...) is typically done incrementally, so the fixes available here should be merged now, without waiting for the entire build to be fixed.

@zurex

zurex commented May 26, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the cleanup PR.

Please remove all changes done on generated code for semantic conventions.

If there are unresolved doxygen issues, this is fine, the CI will need to wait longer before enforcing -Wdocumentation in maintainer mode.

Cleanup work (speaking from experience with warning cleanup, include-what-you-use, ...) is typically done incrementally, so the fixes available here should be merged now, without waiting for the entire build to be fixed.

Thanks for suggestions, kind of busy these days :(.

@marcalff

Copy link
Copy Markdown
Member

Related:

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

See minor cleanup.

Comment thread .clang-format Resolved
@zurex zurex changed the title [DOC] Update all the doc comments and add WDocumention [DOC] Update all the doc comments to pass -WDocumention check May 28, 2025
zurex and others added 3 commits May 29, 2025 10:09
@zurex
zurex requested a review from psx95 June 1, 2025 09:07

@psx95 psx95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing the comments!
Overall it looks good, just a few minor nits remaining.

* @param callback a callback to invoke for each key-value. If the callback returns false,
* the iteration is aborted.
* @return true if every key-value pair was iterated over
* No-op implementation: does not invoke the callback, even if key-value pairs are present.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Technically, the @param should still be there.

@marcalff marcalff changed the title [DOC] Update all the doc comments to pass -WDocumention check [DOC] Update doc comments to pass -WDocumention check Jun 5, 2025
@marcalff
marcalff merged commit d64b653 into open-telemetry:main Jun 5, 2025
malkia added a commit to malkia/opentelemetry-cpp that referenced this pull request Jun 5, 2025
[DOC] Update doc comments to pass -WDocumention check (open-telemetry#3375)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The documentation comments are not matching the code

6 participants