Fix test failure on rolling build#1201
Merged
minggangw merged 1 commit intoRobotWebTools:developfrom Jul 21, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a test failure in the rolling build by improving the IDL converter's preprocessing logic. The changes focus on enhancing the robustness of @verbatim block removal and refining module extraction to handle nested structures more accurately.
- Enhanced @verbatim block parsing with proper string handling and escape sequence support
- Improved module extraction logic to only include parent modules that contain direct definitions
- Added better handling of nested module structures with brace-level tracking
Comments suppressed due to low confidence (3)
rosidl_convertor/idl_convertor.py:197
- [nitpick] The variable name 'i' is ambiguous and doesn't clearly indicate its purpose as a line index. Consider renaming it to 'line_index' or 'current_line_idx' for better readability.
i = 0
rosidl_convertor/idl_convertor.py:216
- [nitpick] The variable name 'j' is ambiguous and doesn't clearly indicate its purpose as a character position index. Consider renaming it to 'char_pos' or 'char_index' for better readability.
j = paren_pos
rosidl_convertor/idl_convertor.py:242
- [nitpick] The variable name 'j' is ambiguous and doesn't clearly indicate its purpose as a character position index. Consider renaming it to 'char_pos' or 'char_index' for better readability.
j = 0
| else: | ||
| # Verbatim block continues to next lines | ||
| i += 1 | ||
| while i < len(lines) and paren_count > 0: |
There was a problem hiding this comment.
This nested parsing logic with multiple while loops and similar character processing code is duplicated between lines 217-236 and lines 243-262. Consider extracting the character-by-character parsing logic into a separate helper method to reduce code duplication and improve maintainability.
minggangw
added a commit
that referenced
this pull request
Jul 22, 2025
This PR fixes a test failure in the rolling build by improving the IDL converter's preprocessing logic. The changes focus on enhancing the robustness of @verbatim block removal and refining module extraction to handle nested structures more accurately. - Enhanced @verbatim block parsing with proper string handling and escape sequence support - Improved module extraction logic to only include parent modules that contain direct definitions - Added better handling of nested module structures with brace-level tracking Fix: #1200
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a test failure in the rolling build by improving the IDL converter's preprocessing logic. The changes focus on enhancing the robustness of @verbatim block removal and refining module extraction to handle nested structures more accurately.
Fix: #1200