You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there are multibyte UTF-8 characters that precede an offense, then the position of offense and subsequent formatting and underlining is incorrect when displaying cached results.
Expected behavior
Cached results should match first-time results.
Actual behavior
Cached results do not match first-time results.
Steps to reproduce the problem
Run rubocop twice on a file containing this UTF-8 text:
puts "føø"
useless = 'bar'
Note that foo is spelled using the Unicode character U+00F8 'Latin Small Letter o With Stroke', which in UTF-8 requires two octets. The first time rubocop runs, it will correctly underline 'useless' and indicate a position of 2:1. On the second time, when it is using cached results, it underlines the end of the first line and indicates a position of 1:12.
This appears to have been fixed - running the HEAD version as of today (624705384ce42e529c479c10f03d0e99a5ae39f8) does not reproduce the issue. I think it was quite possibly fixed by #3000.
When there are multibyte UTF-8 characters that precede an offense, then the position of offense and subsequent formatting and underlining is incorrect when displaying cached results.
Expected behavior
Cached results should match first-time results.
Actual behavior
Cached results do not match first-time results.
Steps to reproduce the problem
Run
rubocop
twice on a file containing this UTF-8 text:Note that foo is spelled using the Unicode character U+00F8 'Latin Small Letter o With Stroke', which in UTF-8 requires two octets. The first time
rubocop
runs, it will correctly underline 'useless' and indicate a position of 2:1. On the second time, when it is using cached results, it underlines the end of the first line and indicates a position of 1:12.RuboCop version
The text was updated successfully, but these errors were encountered: