Closed UziTech closed 5 years ago
The fixPHPCSColumn
function returned the given column if the column is passed the end of the line. This will fix it so the column will be set to the end of the line instead of throwing an error that the column is not found.
I trimmed down the sniff so it just puts an error at the end of every line.
Looks like circleci is failing because of a configuration issue
This should be ready to merge. I squashed the commits. The only reason the tests are failing is because of the circleci configuration issue above.
@Arcanemagus is there a way to fix the error above?
@Arcanemagus do you know how to fix the circleci error?
@Arcanemagus I keep running into this same issue. Can we please get this merged?
I would greatly prefer phpcs
to fix their inane handling of tabs, but I suppose that will never happen. I'm terribly sorry for the time it's taken to get back to this PR, and will take the time tonight determine why:
phpcs
's failure isn't workingAgain, sorry for the delay on this!
This PR isn't really about tabs. Although linter-phpcs
only runs into this bug on lines with tabs.
We get the line text with textEditor.getBuffer().lineForRow(line)
which doesn't contain the line endings for the line.
So if the error is on the line ending the fixPHPCSColumn
function returns the wrong column number.
This PR just fixes fixPHPCSColumn
so it won't return a column past the length of the line including the line endings.
Co-opted this a bit to fix CircleCI (again), since I can't test it directly.
:tada: This PR is included in version 1.7.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fixes column > line length because of tabs