mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-25 23:27:27 +08:00
CI / Build (push) Canceled after 0s
CI / Lint (push) Canceled after 0s
CI / Lua (push) Canceled after 0s
CI / Neovim 0.10 Linux (push) Canceled after 0s
CI / Neovim 0.12 Linux (push) Canceled after 0s
CI / Vim 8.2 Linux (push) Canceled after 0s
CI / Vim 9.2 Linux (push) Canceled after 0s
CI / Neovim 0.10 Windows (push) Canceled after 0s
CI / Neovim 0.12 Windows (push) Canceled after 0s
CI / Vim 8.2 Windows (push) Canceled after 0s
CI / Vim 9.2 Windows (push) Canceled after 0s
* fix: linter fortitude: renamed location key from "row" to "line" * fortitude try line first then row * fortitude add tests with row
114 lines
2.9 KiB
Plaintext
114 lines
2.9 KiB
Plaintext
Before:
|
|
runtime ale_linters/fortran/fortitude.vim
|
|
|
|
After:
|
|
call ale#linter#Reset()
|
|
|
|
Execute(Simple fortitude handler run):
|
|
AssertEqual
|
|
\ [
|
|
\ {
|
|
\ 'lnum': 3,
|
|
\ 'end_lnum': 3,
|
|
\ 'col': 5,
|
|
\ 'end_col': 18,
|
|
\ 'text': '''implicit none'' missing ''external''',
|
|
\ 'type': 'W',
|
|
\ 'code': 'C003',
|
|
\ },
|
|
\ {
|
|
\ 'col': 13,
|
|
\ 'end_col': 14,
|
|
\ 'end_lnum': 7,
|
|
\ 'lnum': 7,
|
|
\ 'text': 'Syntax error',
|
|
\ 'type': 'E',
|
|
\ 'code': 'E001',
|
|
\ },
|
|
\ ],
|
|
\ ale_linters#fortran#fortitude#Handle(bufnr(''), [
|
|
\ '[',
|
|
\ json_encode({
|
|
\ 'code': 'C003',
|
|
\ 'end_location': {'column': 18, 'line': 3},
|
|
\ 'filename': '/home/user/documents/somefortranfile.f90',
|
|
\ 'fix': {
|
|
\ 'applicability': 'unsafe',
|
|
\ 'edits': [
|
|
\ {
|
|
\ 'content': ' (type, external)',
|
|
\ 'end_location': {'column': 18, 'line': 3},
|
|
\ 'location': {'column': 18, 'line': 3},
|
|
\ },
|
|
\ ],
|
|
\ 'message': 'Add `(external)` to ''implicit none''',
|
|
\ },
|
|
\ 'location': {'column': 5, 'line': 3},
|
|
\ 'message': '''implicit none'' missing ''external'''
|
|
\ }),
|
|
\ ',',
|
|
\ json_encode({
|
|
\ 'code': 'E001',
|
|
\ 'end_location': {'column': 14, 'line': 7},
|
|
\ 'filename': '/home/user/documents/somefortranfile.f90',
|
|
\ 'fix': v:null,
|
|
\ 'location': {'column': 13, 'line': 7},
|
|
\ 'message': 'Syntax error',
|
|
\ }),
|
|
\ ']',
|
|
\ ])
|
|
|
|
Execute(Old fortitude handler output with row):
|
|
AssertEqual
|
|
\ [
|
|
\ {
|
|
\ 'lnum': 3,
|
|
\ 'end_lnum': 3,
|
|
\ 'col': 5,
|
|
\ 'end_col': 18,
|
|
\ 'text': '''implicit none'' missing ''external''',
|
|
\ 'type': 'W',
|
|
\ 'code': 'C003',
|
|
\ },
|
|
\ {
|
|
\ 'col': 13,
|
|
\ 'end_col': 14,
|
|
\ 'end_lnum': 7,
|
|
\ 'lnum': 7,
|
|
\ 'text': 'Syntax error',
|
|
\ 'type': 'E',
|
|
\ 'code': 'E001',
|
|
\ },
|
|
\ ],
|
|
\ ale_linters#fortran#fortitude#Handle(bufnr(''), [
|
|
\ '[',
|
|
\ json_encode({
|
|
\ 'code': 'C003',
|
|
\ 'end_location': {'column': 18, 'row': 3},
|
|
\ 'filename': '/home/user/documents/somefortranfile.f90',
|
|
\ 'fix': {
|
|
\ 'applicability': 'unsafe',
|
|
\ 'edits': [
|
|
\ {
|
|
\ 'content': ' (type, external)',
|
|
\ 'end_location': {'column': 18, 'row': 3},
|
|
\ 'location': {'column': 18, 'row': 3},
|
|
\ },
|
|
\ ],
|
|
\ 'message': 'Add `(external)` to ''implicit none''',
|
|
\ },
|
|
\ 'location': {'column': 5, 'row': 3},
|
|
\ 'message': '''implicit none'' missing ''external'''
|
|
\ }),
|
|
\ ',',
|
|
\ json_encode({
|
|
\ 'code': 'E001',
|
|
\ 'end_location': {'column': 14, 'row': 7},
|
|
\ 'filename': '/home/user/documents/somefortranfile.f90',
|
|
\ 'fix': v:null,
|
|
\ 'location': {'column': 13, 'row': 7},
|
|
\ 'message': 'Syntax error',
|
|
\ }),
|
|
\ ']',
|
|
\ ])
|