Skip to content

Add api description convert script#62

Draft
JSUYA wants to merge 7 commits intoflutter-tizen:mainfrom
JSUYA:doxygen_convertor
Draft

Add api description convert script#62
JSUYA wants to merge 7 commits intoflutter-tizen:mainfrom
JSUYA:doxygen_convertor

Conversation

@JSUYA
Copy link
Copy Markdown
Member

@JSUYA JSUYA commented Mar 20, 2026

Converts a description written in doxygen format to dartdoc format.

ex)
dart run ./scripts/convert_description.dart lib/src/bindings/6.0/generated_bindings.dart

before

  /// @brief Gets the last error code in the thread.
  /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  /// @details This function retrieves the last error code which is set by set_last_result()
  /// @return One of #tizen_error_e
  /// @see #tizen_error_e
  /// @see set_last_result()
  int get_last_result() {
    return _get_last_result();
  }

after

  /// Gets the last error code in the thread.
  ///
  /// This function retrieves the last error code which is set by set_last_result()
  ///
  /// **Since Tizen:**
  /// - Mobile 2.3; Wearable 2.3.1
  ///
  /// **Returns:**
  /// - One of `tizen_error_e`
  ///
  /// **See also:**
  /// - `tizen_error_e`
  /// - `set_last_result()`
  int get_last_result() {
    return _get_last_result();
  }

Converts a description written in doxygen format to dartdoc format.

ex)
dart run ./scripts/convert_description.dart lib/src/bindings/6.0/generated_bindings.dart

before
```dart
  /// @brief Gets the last error code in the thread.
  /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  /// @details This function retrieves the last error code which is set by set_last_result()
  /// @return One of #tizen_error_e
  /// @see #tizen_error_e
  /// @see set_last_result()
  int get_last_result() {
    return _get_last_result();
  }
```

after
```dart
  /// Gets the last error code in the thread.
  ///
  /// This function retrieves the last error code which is set by set_last_result()
  ///
  /// **Since Tizen:**
  /// - Mobile 2.3; Wearable 2.3.1
  ///
  /// **Returns:**
  /// - One of `tizen_error_e`
  ///
  /// **See also:**
  /// - `tizen_error_e`
  /// - `set_last_result()`
  int get_last_result() {
    return _get_last_result();
  }
```
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a useful script for converting Doxygen-style comments to Dartdoc format. The implementation is comprehensive and covers a wide range of Doxygen tags. I've provided a few suggestions to improve maintainability, correctness of the generated documentation, and usability of the script. Specifically, I've commented on improving a complex regular expression, handling code block languages dynamically, correcting the usage message, and adding missing documentation for public functions as per the repository's style guide.

Comment thread scripts/convert_description.dart Outdated
Comment thread scripts/convert_description.dart Outdated
Comment thread scripts/convert_description.dart Outdated
Comment thread scripts/convert_description.dart
@JSUYA
Copy link
Copy Markdown
Member Author

JSUYA commented Mar 20, 2026

/gemini review

@JSUYA JSUYA requested a review from seungsoo47 March 20, 2026 10:16
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Dart script for converting Doxygen-style comments into Dartdoc format. The script is quite comprehensive and handles many Doxygen features. My review focuses on improving the script's performance and robustness. The main feedback points are related to avoiding repeated creation of RegExp objects within loops, which is a performance concern, and strengthening the logic for parsing Dart code to make it less fragile. These changes will make the script more efficient and reliable.

Comment thread scripts/convert_description.dart Outdated
Comment thread scripts/convert_description.dart Outdated
Comment thread scripts/convert_description.dart
Comment thread scripts/convert_description.dart
@JSUYA JSUYA marked this pull request as draft April 4, 2026 05:57
seungsoo47 added a commit to seungsoo47/tizen_interop that referenced this pull request Apr 16, 2026
This script was taken from flutter-tizen#62.
And I converted all binding code from Doxygen format to DartDoc format.
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.

1 participant