ale/test/handler/test_thriftcheck_handler.vader
Jon Parise c5c58f5bf8
Improve the thriftcheck handler pattern (#3893)
More recent versions of thriftcheck use a more compliant GCC-style
output format which includes a space before the "severity" group.
This matches similar tools, like shellcheck.

This change adjusts the handler's pattern to parse this format in a
backwards-compatible way (even though backwards compatibility isn't
critical long-term as thriftcheck itself is close to its 1.0 release).
2021-09-08 21:48:48 +09:00

29 lines
805 B
Plaintext

Before:
runtime ale_linters/thrift/thriftcheck.vim
After:
call ale#linter#Reset()
Execute(The thriftcheck handler should handle basic warnings and errors):
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'col': 1,
\ 'type': 'E',
\ 'text': '"py" namespace must match "^idl\\."',
\ 'code': 'namespace.pattern',
\ },
\ {
\ 'lnum': 3,
\ 'col': 5,
\ 'type': 'W',
\ 'text': '64-bit integer constant -2147483649 may not work in all languages',
\ 'code': 'int.64bit',
\ },
\ ],
\ ale_linters#thrift#thriftcheck#Handle(1, [
\ 'file.thrift:1:1: error: "py" namespace must match "^idl\\." (namespace.pattern)',
\ 'file.thrift:3:5: warning: 64-bit integer constant -2147483649 may not work in all languages (int.64bit)',
\ ])