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

Move all private (set) variables to non_private_items. #17

Open
rresma2 opened this issue Nov 18, 2018 · 0 comments
Open

Move all private (set) variables to non_private_items. #17

rresma2 opened this issue Nov 18, 2018 · 0 comments

Comments

@rresma2
Copy link

rresma2 commented Nov 18, 2018

Hi Paul, I'd like feedback on the following change as well as permissions to PR if possible.

Currently in Master

non_private_items, private_items = file_items.partition {  |f|
    !f.modifiers.include?("private") 
        && !f.modifiers.include?("fileprivate") 
}

Proposed Change

private_items, non_private_items = file_items.partition { |f|
    (
        f.modifiers.include?("private")
            && !f.modifiers.include?("(set)")
    ) || (
            f.modifiers.include?("fileprivate")
    )
}

Basically I want to make sure to only count private items if they don't contain (set).

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

No branches or pull requests

1 participant