summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorJon Parise <jon@indelible.org>2021-08-03 17:29:07 -0700
committerGitHub <noreply@github.com>2021-08-04 09:29:07 +0900
commit2dd9790281b8fa8e31b664629ecbb06de46c5a70 (patch)
treedc5bd1661f56fcce4703f977f1d396add819c616 /test/handler
parentfa032b1b7fde1cb00bfa3e16a0d3ebd37a7d8be4 (diff)
downloadale-2dd9790281b8fa8e31b664629ecbb06de46c5a70.zip
Add a thriftcheck linter (#3852)
ThriftCheck (https://github.com/pinterest/thriftcheck) is a linter for Thrift IDL files.
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_thriftcheck_handler.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/handler/test_thriftcheck_handler.vader b/test/handler/test_thriftcheck_handler.vader
new file mode 100644
index 00000000..efe62593
--- /dev/null
+++ b/test/handler/test_thriftcheck_handler.vader
@@ -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)',
+ \ ])