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:
MD
2023-12-08 19:13:37 -03:00
committed by GitHub
parent 32ee7039d0
commit 71718722b2
7 changed files with 110 additions and 0 deletions

View 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',
\ ])