Skip to content

Conversation

@jreidinger
Copy link
Member

Trying changes from new rubocop. Review per commit to distinguish what was done manually and what automatic.

see also yast/yast-yast2#1298

@jreidinger jreidinger force-pushed the experimental_rubocop branch from 69bcb6b to c003d57 Compare January 4, 2024 21:04
def enabled_snapshots?(filesystems)
root_fs = filesystems.find(&:root?)
return nil if root_fs.nil? || (root_fs.multidevice? && !btrfs_drive_section?)
return false if root_fs.nil? || (root_fs.multidevice? && !btrfs_drive_section?)
Copy link
Member Author

Choose a reason for hiding this comment

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

and this cause several test failures. I am not sure if it is correct change. On one hand it is ? method, but nil is documented there. Also not sure if it is common in storage or one single occurrence.

# @return [Boolean]
def compatible_disk?(partition, space)
return true unless partition.disk && partition.disk != space.disk_name
true unless partition.disk && partition.disk != space.disk_name
Copy link
Member

Choose a reason for hiding this comment

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

It says @return [Boolean] but it actually returns true or nil... 🤔

Yard strictly defines Boolean as either true or false values, nothing else.

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.

3 participants