All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 runtime ale_linters/ruby/rubocop.vim
5 call ale#linter#Reset()
7 Execute(The rubocop handler should parse lines correctly):
14 \ 'text': 'Prefer single-quoted strings...',
15 \ 'code': 'Style/SomeCop',
22 \ 'text': 'Some error',
23 \ 'code': 'Style/SomeOtherCop',
30 \ 'text': 'Regular warning',
31 \ 'code': 'Style/WarningCop',
38 \ 'text': 'Another error',
39 \ 'code': 'Style/SpaceBeforeBlockBraces',
43 \ ale#ruby#HandleRubocopOutput(347, [
44 \ '{"metadata":{"rubocop_version":"0.47.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-linux-gnu"},"files":[{"path":"my_great_file.rb","offenses":[{"severity":"convention","message":"Prefer single-quoted strings...","cop_name":"Style/SomeCop","corrected":false,"location":{"line":83,"column":29,"length":7}},{"severity":"fatal","message":"Some error","cop_name":"Style/SomeOtherCop","corrected":false,"location":{"line":12,"column":2,"length":1}},{"severity":"warning","message":"Regular warning","cop_name":"Style/WarningCop","corrected":false,"location":{"line":10,"column":5,"length":8}},{"severity":"error","message":"Another error","cop_name":"Style/SpaceBeforeBlockBraces","corrected":false,"location":{"line":11,"column":1,"length":1}}]}],"summary":{"offense_count":4,"target_file_count":1,"inspected_file_count":1}}'
47 Execute(The rubocop handler should handle when files are checked and no offenses are found):
50 \ ale#ruby#HandleRubocopOutput(347, [
51 \ '{"metadata":{"rubocop_version":"0.47.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-linux-gnu"},"files":[{"path":"my_great_file.rb","offenses":[]}],"summary":{"offense_count":0,"target_file_count":1,"inspected_file_count":1}}'
54 Execute(The rubocop handler should handle when no files are checked):
57 \ ale#ruby#HandleRubocopOutput(347, [
58 \ '{"metadata":{"rubocop_version":"0.47.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-linux-gnu"},"files":[],"summary":{"offense_count":0,"target_file_count":0,"inspected_file_count":0}}'
61 Execute(The rubocop handler should handle empty output):
62 AssertEqual [], ale#ruby#HandleRubocopOutput(347, ['{}'])
63 AssertEqual [], ale#ruby#HandleRubocopOutput(347, [])