summaryrefslogtreecommitdiff
path: root/test/handler/test_foodcritic_handler.vader
blob: 67cb6cab4e75497b5edec5664b786e46e3da51d4 (plain)
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
Before:
  runtime ale_linters/chef/foodcritic.vim

After:
  call ale#linter#Reset()

Execute(Basic warnings should be handled):
  AssertEqual
  \ [
  \   {
  \     'lnum': 1,
  \     'code': 'CINK001',
  \     'type': 'W',
  \     'text': 'Missing CHANGELOG in markdown format',
  \     'filename': '/foo/bar/CHANGELOG.md',
  \   },
  \   {
  \     'lnum': 1,
  \     'code': 'FC011',
  \     'type': 'W',
  \     'text': 'Missing README in markdown format',
  \     'filename': '/foo/bar/README.md',
  \   },
  \   {
  \     'lnum': 1,
  \     'code': 'FC031',
  \     'type': 'W',
  \     'text': 'Cookbook without metadata.rb file',
  \     'filename': '/foo/bar/metadata.rb',
  \   },
  \   {
  \     'lnum': 1,
  \     'code': 'FC071',
  \     'type': 'W',
  \     'text': 'Missing LICENSE file',
  \     'filename': '/foo/bar/LICENSE',
  \   },
  \ ],
  \ ale_linters#chef#foodcritic#Handle(bufnr(''), [
  \   'CINK001: Missing CHANGELOG in markdown format: /foo/bar/CHANGELOG.md:1',
  \   'FC011: Missing README in markdown format: /foo/bar/README.md:1',
  \   'FC031: Cookbook without metadata.rb file: /foo/bar/metadata.rb:1',
  \   'FC071: Missing LICENSE file: /foo/bar/LICENSE:1',
  \ ])