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

fix: use clean code style method ordering #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ferranpm
Copy link
Member

What is the goal?

After realising that the Obsession/MethodOrder cop prefers this order

def method_a; method_c; end
def method_c; 42; end
def method_b; method_c; end # We would expect method_c to appear under method_b

To this one

def method_a; method_c; end
def method_b; method_c; end
def method_c; 42; end

We wrote this PR in order to be able to configure it
We want to favour the method order described in Clean Code, so we're changing the configuration

Is this a restricting or expanding change?

Restricting, although following the previous idea for adding this cop

References

How is it being implemented?

  • Add the new configuration flag

@ferranpm ferranpm requested a review from a team as a code owner February 27, 2025 09:42
@ferranpm ferranpm changed the title Use clean code style method ordering fix: use clean code style method ordering Feb 27, 2025
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.

1 participant