mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-01 17:13:30 +08:00
Add a thriftcheck linter (#3852)
ThriftCheck (https://github.com/pinterest/thriftcheck) is a linter for Thrift IDL files.
This commit is contained in:
28
test/handler/test_thriftcheck_handler.vader
Normal file
28
test/handler/test_thriftcheck_handler.vader
Normal file
@@ -0,0 +1,28 @@
|
||||
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)',
|
||||
\ ])
|
||||
Reference in New Issue
Block a user