mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 13:02:28 +08:00
Add support for Scarb in cairo files (#4669)
* Add support for Scarb in `cairo` files * specify if linter should run on saved
This commit is contained in:
20
test/handler/test_scarb_handler.vader
Normal file
20
test/handler/test_scarb_handler.vader
Normal file
@@ -0,0 +1,20 @@
|
||||
Before:
|
||||
runtime ale_linters/cairo/scarb.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(Check scarb output parsing):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 40,
|
||||
\ 'col': 48,
|
||||
\ 'text': 'Skipped tokens. Expected: Const/Module/Use/FreeFunction/ExternFunction/ExternType/Trait/Impl/Struct/Enum/TypeAlias/InlineMacro or an attribute.',
|
||||
\ 'type': 'E',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#cairo#HandleCairoErrors(bufnr(''), [
|
||||
\ 'error: Skipped tokens. Expected: Const/Module/Use/FreeFunction/ExternFunction/ExternType/Trait/Impl/Struct/Enum/TypeAlias/InlineMacro or an attribute.',
|
||||
\ ' --> /path/to/file.cairo:40:48',
|
||||
\ ])
|
||||
Reference in New Issue
Block a user