Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental rubocop #1364

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Experimental rubocop #1364

wants to merge 5 commits into from

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
@@ -619,7 +619,7 @@ def use_value_from_string(use)
# nil if the root filesystem is not applicable.
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.

@@ -247,7 +247,7 @@ def partition_candidate_spaces(partition, candidate_spaces, extra_spaces)
#
# @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.

2 participants