cucumber / cucumber-expressions

Human friendly alternative to Regular Expressions
MIT License
148 stars 51 forks source link

Ruby: Layout rubocop fixes #235

Closed luke-hill closed 11 months ago

luke-hill commented 11 months ago

🤔 What's changed?

Bunch of simple layout fixes

⚡️ What's your motivation?

All autofixes, clear a lot of the low-hanging fruit

🏷️ What kind of change is this?

♻️ Anything particular you want feedback on?

📋 Checklist:


This text was originally generated from a template, then edited by hand. You can modify the template here.

luke-hill commented 11 months ago

@mpkorstanje whilst doing some very basic refactoring / linting here. I noticed we have a situation in which we want to define a method called end

I imagine in other languages it's a similar issue. But it would be good if we could maybe change this to something like ending. Whilst it's not 100% invalid to be called end it often cannot be parsed or read as it's understood to be a keyword definition. There are a few small exceptions in ruby - such as using send("end") to call it using metaprogramming.

Given you've done most of the work here recently, other than Aslak I figured I'd ask you for your thoughts.

I also noticed that we seem to refer to the iVar @end in some hashable methods e.t.c. - So maybe we can just do away with the methods completely (i.e. delete #end alongside all the other methods?) I don't know as I only spent 5mins diving in here.

luke-hill commented 11 months ago

I've raised an issue here: https://github.com/cucumber/cucumber-expressions/issues/236 to discuss this in more detail