Closed foobear closed 2 years ago
I prefer double quotes, but do we need to worry about this:
rubocop -a
and throws away 10 years of Git history with a giant commitI don't care much about which quotes to use, but I'd strongly prefer not to make the git history useless. Therefore I'm voting for keeping the present style.
Any Rubocop upgrade may require a more or less dramatic change of existing code. Developers should always be aware of that when upgrading makandra-rubocop
in their projects.
"Legacy" projects (i.e. prior to changing the default) could just set their current style in rubocop.yml
(the file exists in all, if only to load defaults).
I would be careful to prevent change just because of that. If a project does not want to commit to a changed default, just specify it. There will always be changes to the default ruleset.
And you (almost) always have the option of not upgrading makandra-rubocop.
I agree, we should not avoid changing our style guide because of existing projects.
That's true, but if there are no real benefits from one approach over the other, preserving what we have is a good idea in my opinion. It avoids confusion (people are switching between projects) and discussion ("why don't we change it to the new default?"). As everyone seems not to care too much which style we use I don't see why we should change the default. If someone sees good arguments for double quotes as default, maybe it would be best to state them here :)
If we get benefits from changing something I fully agree and think we should not avoid that change because of existing projects.
If someone sees good arguments for double quotes as default, maybe it would be best to state them here :)
With double quotes as the default I no longer need to think whether I'm going to interpolate when starting a string. This breaks my flow every time.
I'm a bit surprised that no one seems to care which quotes we use, but we couldn't agree to no longer care in #25 :smiley:
At least we agreed on needing a single defined style instead of disabling the cop.
With double quotes as the default I no longer need to think whether I'm going to interpolate when starting a string. This breaks my flow every time.
Ok, my workflow is very different from yours I guess: I just write my code how I want (double quotes and all). When I'm finished and everything works I run rubocop -a
once.
When you have to add interpolation to existing single quoted strings it could be annoying, though. Maybe your projects require that more often than mine.
Ok, my workflow is very different from yours I guess: I just write my code how I want (double quotes and all). When I'm finished and everything works I run rubocop -a once.
I see. I guess this would also work if I disable all Rubocop warnings in my IDE. As long as I see a warning in the editor I'm going to check it in case it's something serious.
Derived from the votes in the issue, I will close this issue, since no action is needed. Please reopen it, if I missed something.
Coming from https://github.com/makandra/makandra-rubocop/issues/25, we should decide if we want to keep single quotes as the preferred quotes style, or move to double quotes.
Please vote:
:+1: = Change to double quotes :-1: = Keep single quotes :eyes: = Either style is fine, as long as there is a rule (previously labeled "don't care")
Note that each project may still configure a per-project style in
rubocop.yml
(also useful if your project already uses a different style than the global default). Example: