Styling changes that have to do with array indentation.
Rubocop complaints if indentation of items of arrays are not as it expects them to be based on Style/IndentArray cop. So, I have fixed the indentation to be compatible with rubocop.
This change is required if we want to comply with rubocop rules.
I have run all the tests with bundle exec rake and everything was green.
bundle exec rake
Please, can you double check the indentation in the tests? The rest looks good to me, great stuff!
Just wondering, is this indentation correct?
@nodo, the error that this PR fixes is related to this violation message:
spec/cucumber/formatter/legacy_api/adapter_spec.rb:162:15: C: Use 2 spaces for indentation in an array, relative to the start of the line where the left square bracket is.
So, I avoided doing any more changes other than the ones minimum needed to get rid of this violation 🙂
Moving the indentation 2 spaces to the left (for the whole block) fixed that. Do you think that I should work on this with further enhancements? If yes, what enhancements would you suggest?
Hi @pmatsinopoulos, sorry for the late reply. Makes sense! It would be great to fix the indentation as well. I that all the elements of the array should be aligned with an indentation of 2 spaces. What do you think?
Hi @nodo . I do not have problem to ident the way you are suggesting. However, I think that the person who has picked up such indentation did that to make the reading easier. It seems that the chosen nesting has some kind of logic, representative of the semantics of the symbols in the context they are used. I am not sure what logic is that, but it looks to me that something is going on there that makes the reading easier. Do you want to check with @mattwynne (I see the latest commits are his) before we actually go ahead and flat the indentation on those long lists of elements?
Absolutely :) thanks @pmatsinopoulos !
Yes, this indentation is there to make the tests easier to read / write, since you need matching pairs of those messages. I'd be happy to see it disappear though if it's a pain - I hope we'll be able to remove this entire file soon.
Certainly, moving the indentation two spaces to the left would be fine!
Fixes rubocop violation Style/IndentArray
Updated .rubocop_todo.yml with rubocop --auto-gen-config