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/eruby/erblint.vim
5 call ale#linter#Reset()
7 Execute(The erblint handler should parse lines correctly):
14 \ 'text': 'Extra blank line detected.',
15 \ 'code': 'ExtraNewline',
22 \ 'text': 'Remove multiple trailing newline at the end of the file.',
23 \ 'code': 'FinalNewline',
30 \ 'text': 'Use 1 space after `<%=` instead of 2 spaces.',
31 \ 'code': 'SpaceAroundErbTag',
38 \ 'text': 'Use 1 space before `%>` instead of 2 spaces.',
39 \ 'code': 'SpaceAroundErbTag',
46 \ 'text': 'Extra whitespace detected at end of line.',
47 \ 'code': 'TrailingWhitespace',
51 \ ale_linters#eruby#erblint#Handle(347, [
52 \ '{"metadata":{"erb_lint_version":"0.1.1","ruby_engine":"ruby","ruby_version":"3.0.2","ruby_patchlevel":"107","ruby_platform":"arm64-darwin20"},"files":[{"path":"demo.html.erb","offenses":[{"linter":"ExtraNewline","message":"Extra blank line detected.","location":{"start_line":3,"start_column":0,"last_line":4,"last_column":0,"length":1}},{"linter":"FinalNewline","message":"Remove multiple trailing newline at the end of the file.","location":{"start_line":6,"start_column":0,"last_line":8,"last_column":0,"length":2}},{"linter":"SpaceAroundErbTag","message":"Use 1 space after `<%=` instead of 2 spaces.","location":{"start_line":4,"start_column":9,"last_line":4,"last_column":11,"length":2}},{"linter":"SpaceAroundErbTag","message":"Use 1 space before `%>` instead of 2 spaces.","location":{"start_line":4,"start_column":9,"last_line":4,"last_column":11,"length":2}},{"linter":"TrailingWhitespace","message":"Extra whitespace detected at end of line.","location":{"start_line":5,"start_column":6,"last_line":5,"last_column":10,"length":4}}]}],"summary":{"offenses":5,"inspected_files":1,"corrected":0}}'
55 Execute(The erblint handler should handle when files are checked and no offenses are found):
58 \ ale_linters#eruby#erblint#Handle(347, [
59 \ '{"metadata":{"erb_lint_version":"0.1.1","ruby_engine":"ruby","ruby_version":"3.0.2","ruby_patchlevel":"107","ruby_platform":"arm64-darwin20"},"files":[{"path":"demo.html.erb","offenses":[]}],"summary":{"offenses":0,"inspected_files":1,"corrected":0}}'
62 Execute(The erblint handler should handle output without any errors):
63 AssertEqual [], ale_linters#eruby#erblint#Handle(347, ['{}'])
64 AssertEqual [], ale_linters#eruby#erblint#Handle(347, [])