Skip to content

Commit

Permalink
fix(check_caret_rclcpp): skip check_caret_rclcpp for ROS Distribution…
Browse files Browse the repository at this point in the history
…s after iron

Signed-off-by: ymski <[email protected]>
  • Loading branch information
ymski committed Oct 24, 2023
1 parent c9abeba commit dce9a8c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ros2caret/verb/check_caret_rclcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class RclcppCheck():

def __init__(self, root_dir_path: str) -> None:
RclcppCheck._ensure_dir_exist(root_dir_path)
RclcppCheck._validate_ros_distrinution(root_dir_path)

Check warning on line 74 in ros2caret/verb/check_caret_rclcpp.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (distrinution)
get_package_name = RclcppCheck._create_get_package_name(root_dir_path)
ros_obj_paths = RclcppCheck._get_obj_paths(root_dir_path)
Expand Down Expand Up @@ -170,6 +171,16 @@ def _ensure_dir_exist(path: str):
'where the build command completed.')
exit(1)

@staticmethod
def _validate_ros_distrinution(path: str):
if os.environ['ROS_DISTRO'][0] < 'i':

Check warning on line 176 in ros2caret/verb/check_caret_rclcpp.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (distrinution)
return
logger.info('For ROS Distributions after iron, '
'applications can be evaluated '
'without building with caret-rclcpp. '
'For this reason, the verification procedure is skipped.')
exit(0)

@staticmethod
def get_package_name_from_path(root_dir_path: str, path: str) -> str:
package_name = path.replace(root_dir_path, '').split('/')[0]
Expand Down

0 comments on commit dce9a8c

Please sign in to comment.