]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/handler/test_solhint_handler.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_solhint_handler.vader
1 Before:
2   runtime ale_linters/solidity/solhint.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The solhint handler should parse linter error messages correctly):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 1,
12   \     'col': 17,
13   \     'text': 'Compiler version must be fixed',
14   \     'code': 'compiler-fixed',
15   \     'type': 'W',
16   \   },
17   \   {
18   \     'lnum': 4,
19   \     'col': 8,
20   \     'text': 'Use double quotes for string literals',
21   \     'code': 'quotes',
22   \     'type': 'E',
23   \   },
24   \   {
25   \     'lnum': 5,
26   \     'col': 8,
27   \     'text': 'Use double quotes for string literals',
28   \     'code': 'quotes',
29   \     'type': 'E',
30   \   },
31   \   {
32   \     'lnum': 13,
33   \     'col': 3,
34   \     'text': 'Expected indentation of 4 spaces but found 2',
35   \     'code': 'indent',
36   \     'type': 'E',
37   \   },
38   \   {
39   \     'lnum': 14,
40   \     'col': 3,
41   \     'text': 'Expected indentation of 4 spaces but found 2',
42   \     'code': 'indent',
43   \     'type': 'E',
44   \   },
45   \   {
46   \     'lnum': 47,
47   \     'col': 3,
48   \     'text': 'Function order is incorrect, public function can not go after internal function.',
49   \     'code': 'func-order',
50   \     'type': 'E',
51   \   },
52   \ ],
53   \ ale_linters#solidity#solhint#Handle(bufnr(''), [
54   \   'contracts/Bounty.sol:1:17: Compiler version must be fixed [Warning/compiler-fixed]',
55   \   'contracts/Bounty.sol:4:8: Use double quotes for string literals [Error/quotes]',
56   \   'contracts/Bounty.sol:5:8: Use double quotes for string literals [Error/quotes]',
57   \   'contracts/Bounty.sol:13:3: Expected indentation of 4 spaces but found 2 [Error/indent]',
58   \   'contracts/Bounty.sol:14:3: Expected indentation of 4 spaces but found 2 [Error/indent]',
59   \   'contracts/Bounty.sol:47:3: Function order is incorrect, public function can not go after internal function. [Error/func-order]',
60   \ ])
61
62 Execute(The solhint handler should parse syntax error messages correctly):
63   AssertEqual
64   \ [
65   \   {
66   \     'lnum': 30,
67   \     'col': 4,
68   \     'text': "missing ';' at 'uint248'",
69   \     'code': 'Parse error',
70   \     'type': 'E',
71   \   },
72   \   {
73   \     'lnum': 203,
74   \     'col': 4,
75   \     'text': "no viable alternative at input '_loserStakeMultiplier}'",
76   \     'code': 'Parse error',
77   \     'type': 'E',
78   \   },
79   \ ],
80   \ ale_linters#solidity#solhint#Handle(bufnr(''), [
81   \   "contracts/Bounty.sol:30:4: Parse error: missing ';' at 'uint248' [Error]",
82   \   "contracts/Bounty.sol:203:4: Parse error: no viable alternative at input '_loserStakeMultiplier}' [Error]",
83   \ ])