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

Configurable IndentationWidth #872

Closed
adamnbowen opened this issue Mar 13, 2014 · 7 comments
Closed

Configurable IndentationWidth #872

adamnbowen opened this issue Mar 13, 2014 · 7 comments
Assignees

Comments

@adamnbowen
Copy link

Before I start working on a pull request, I want to test the waters a bit: Are you open to making IndentationWidth configurable?

My team has adopted a 4 space indentation width across languages for consistency's sake, but I'm interested in using rubocop to enforce all other parts of the ruby style guide. I know I can just turn off indentation checking in rubocop, but I'd rather have it check for correct 4 space indentation as well.

It looks like a few files throughout the library would require changing (references to IndentationWidth::CORRECT_INDENTATION), and the tests for IndentationWidth would also need adjustment, as they have 2 hard-coded in their message checks (or at the very least, we'd want to add a few tests checking for a configured IndentationWidth::CORRECT_INDENTATION).

I'd rather not have to monkey patch something that ideally could just live in the .rubocop.yml.

So if I take a stab at a pull request, are you likely to consider merging it in?

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 13, 2014

Sure - we'll accept such a PR. We're all for configurable style choices. The reason there's currently none for this particular cop is that nobody expressed an interest to make this configurable.

@adamnbowen
Copy link
Author

Awesome—I'll get started on implementing it then :)—
Sent from Mailbox for iPhone

On Thu, Mar 13, 2014 at 8:33 AM, Bozhidar Batsov [email protected]
wrote:

Sure - we'll accept such a PR. We'll all for configurable style choices. The reason there's currently none for this particular cop is that nobody expressed an interest to make this configurable.

Reply to this email directly or view it on GitHub:
#872 (comment)

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 27, 2014

@adamnbowen Ping :-)

@adamnbowen
Copy link
Author

Lol, don't worry, it's still on my TODO list ;)

@bbatsov
Copy link
Collaborator

bbatsov commented Jun 12, 2014

@adamnbowen I'll be closing this. Feel free to reopen it when you're ready with the implementation.

@bbatsov bbatsov closed this as completed Jun 12, 2014
@RX14
Copy link

RX14 commented Oct 19, 2014

Ping, 4 spaces is wayy more readable for me!

@jonas054
Copy link
Collaborator

I'm reopening and assigning myself. I have an implementation almost ready.

@jonas054 jonas054 reopened this Oct 19, 2014
@jonas054 jonas054 self-assigned this Oct 19, 2014
bbatsov added a commit that referenced this issue Oct 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants