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

Special getter / setter / hasser cases for ordered_class_elements #2746

Closed
soullivaneuh opened this issue May 4, 2017 · 12 comments
Closed
Labels
contribution welcome Core team is looking for a contribution kind/feature request

Comments

@soullivaneuh
Copy link
Contributor

soullivaneuh commented May 4, 2017

I like the ordered_class_elements class fixer, but I would like to keep "pure" getters, setters and hassers at the end of my class, whatever the public / protected / private order definition.

Maybe could we add hierarchy options for that?

@keradus
Copy link
Member

keradus commented May 4, 2017

for me, it's too specific, 👎 unless you provide nice, generic solution

@soullivaneuh
Copy link
Contributor Author

Having getters, setters and hassers option for function directly "linked" to the property is the more generic way IMHO.

Or I didn't understand your question. 😉

@TomasVotruba
Copy link

@soullivaneuh I think question was: how would you solve that?

@soullivaneuh
Copy link
Contributor Author

@TomasVotruba Not sure to understand your question.

I talked about the option. After that I can work on some POC to see what is possible.

@TomasVotruba
Copy link

@soullivaneuh It's been a while for me. I guess I was curious about specific approach that would make sense.

I'm personally fine with public/protected/private, ordered by use order.

E.g. while 1st public method uses 2 private methods, they should be in top of private methods.

@keradus
Copy link
Member

keradus commented Jul 4, 2017

big 👎 for that.
then, other public method would use that private, and code would be rearrange because of that :/

@TomasVotruba
Copy link

TomasVotruba commented Jul 4, 2017

Nono, I don't want a fixer for that 👍 I'm fine with my hands and AI 😄

@soullivaneuh
Copy link
Contributor Author

What about keeping the default behavior and propose this as option? If you don't want to add exception, just don't activate them?

@keradus
Copy link
Member

keradus commented Dec 15, 2017

then #2746 (comment)

@Wirone
Copy link
Member

Wirone commented May 18, 2023

It would be better if #6360 (or subsequent PR based on it) could provide wildcard support for custom order, so you could use method:get*, method:set* and method:has* at any place you want. Other than that, I'm with @keradus and 👎 for any non-flexible solution.

@Wirone Wirone added contribution welcome Core team is looking for a contribution and removed status/to verify issue needs to be confirmed or analysed to continue labels May 18, 2023
@github-actions

This comment was marked as outdated.

@Wirone
Copy link
Member

Wirone commented Aug 23, 2023

I am going to close this because it's 6 years old and did not get enough traction. Let's sum it up:

  • only generic solution might me accepted
  • there's already support for custom method placement and it's a good starting point to provide support for wildcards
  • it's out of the scope of core team's focus, so keeping issue open does not make sense, but if anyone wants it, we're open for a PR

@Wirone Wirone closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Core team is looking for a contribution kind/feature request
Projects
None yet
Development

No branches or pull requests

5 participants