mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 14:56:52 +08:00
Adds support for Tlint - A Tighten Opinionated PHP Linter (#3291)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
This commit is contained in:
34
test/handler/test_tlint_handler.vader
Normal file
34
test/handler/test_tlint_handler.vader
Normal file
@@ -0,0 +1,34 @@
|
||||
Before:
|
||||
runtime ale_linters/php/tlint.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The tlint handler should calculate line numbers):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': '5',
|
||||
\ 'col': 0,
|
||||
\ 'sub_type':
|
||||
\ 'style',
|
||||
\ 'type': 'W',
|
||||
\ 'text': ['! There should be no unused imports.', 'There should be no unused imports.', '', '', '', '', '', '', '', '']
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': '15',
|
||||
\ 'col': 0,
|
||||
\ 'sub_type':
|
||||
\ 'style',
|
||||
\ 'type': 'W',
|
||||
\ 'text': ['! There should be no method visibility in test methods.', 'There should be no method visibility in test methods.', '', '', '', '', '', '', '', '']
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#php#tlint#Handle(347, [
|
||||
\ "Lints for /Users/jose/Code/Tighten/tester/tests/Unit/ExampleTest.php",
|
||||
\ "============",
|
||||
\ "! There should be no unused imports.",
|
||||
\ "5 : `use Illuminate\Foundation\Testing\RefreshDatabase;`",
|
||||
\ "! There should be no method visibility in test methods.",
|
||||
\ "15 : ` public function testBasicTest()`",
|
||||
\ ])
|
||||
Reference in New Issue
Block a user