File: test_puglint_handler.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (45 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Before:
  runtime ale_linters/pug/puglint.vim

After:
  call ale#linter#Reset()

Execute(Regular errors should be handled):
  AssertEqual
  \ [
  \   {
  \     'lnum': 1,
  \     'col': 5,
  \     'type': 'E',
  \     'text': 'Static attribute "class" must be written as class literal',
  \   },
  \ ],
  \ ale_linters#pug#puglint#Handle(0, [
  \   '/tmp/vwYwsJA/233/test.pug:1:5 Static attribute "class" must be written as class literal',
  \ ])

Execute(syntax errors in the configuration file should be handled):
  AssertEqual
  \ [
  \   {
  \     'lnum': 1,
  \     'text': 'puglint configuration error (type :ALEDetail for more information)',
  \     'detail': join(
  \       [
  \         'undefined:2',
  \         '  disallowClassAttributeWithStaticValue: true',
  \         '  ^',
  \         'SyntaxError: Unexpected token d in JSON at position 4',
  \         '    at JSON.parse (<anonymous>)',
  \       ],
  \       "\n"
  \     ),
  \   },
  \ ],
  \ ale_linters#pug#puglint#Handle(0, [
  \   'undefined:2',
  \   '  disallowClassAttributeWithStaticValue: true',
  \   '  ^',
  \   'SyntaxError: Unexpected token d in JSON at position 4',
  \   '    at JSON.parse (<anonymous>)',
  \ ])