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
False positive of IndentationStyle
with tabs and alignment
#7884
Comments
Forgot to /cc @DracoAter |
Currently the cop (when EnforcedStyle: tabs) looks for spaces before any alpha-numeric in a line, expecting that there should be only indentation. But turns out there can be alignment too. Probably we could switch the behaviour in such case to look for expected number of tabs in the beginning of the line? |
Ideally, we should check a number of tabs (as indentation) and a number of spaces (alignment, relatively to the previous line). At least number of tabs relatively to the start of previous line (and left alignment to developer responsibility). |
I guess here should be the ~bug label. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
It's probably not too popular case, and heredocs make good job, so it can be closed probably according to RuboCop policy (if I've understood and remember it correctly). |
@koic is it resolved? One of my projects got |
Hello.
I'm trying to update RuboCop to version 0.82.0 for Flame.
I'm using tabs in this project.
And there is alignment in
.gemspec
file:Expected behavior
No offenses.
Actual behavior
There is offense about spaces.
Steps to reproduce the problem
Code placed above.
RuboCop version
The text was updated successfully, but these errors were encountered: