summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2022-01-05 22:34:47 +0900
committerGitHub <noreply@github.com>2022-01-05 22:34:47 +0900
commit76bd0593713004ae38d738874e9e0575aefc88dd (patch)
treec7575354a13d15438b65f7e4768f8ffd058699d4
parent5a5029b73d9cfb277ba84c29c2f787b88469ab0f (diff)
downloadale-76bd0593713004ae38d738874e9e0575aefc88dd.zip
Fix 3838 - deprecate datanalyzer (#3839)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
-rw-r--r--ale_linters/dart/dartanalyzer.vim36
-rw-r--r--doc/ale-dart.txt33
-rw-r--r--doc/ale-supported-languages-and-tools.txt1
-rw-r--r--doc/ale.txt1
-rw-r--r--supported-tools.md5
-rw-r--r--test/handler/test_dartanalyzer_handler.vader28
-rw-r--r--test/linter/test_dartanalyzer.vader20
7 files changed, 2 insertions, 122 deletions
diff --git a/ale_linters/dart/dartanalyzer.vim b/ale_linters/dart/dartanalyzer.vim
deleted file mode 100644
index 0a4d9742..00000000
--- a/ale_linters/dart/dartanalyzer.vim
+++ /dev/null
@@ -1,36 +0,0 @@
-" Author: w0rp <devw0rp@gmail.com>
-" Description: Check Dart files with dartanalyzer
-
-call ale#Set('dart_dartanalyzer_executable', 'dartanalyzer')
-
-function! ale_linters#dart#dartanalyzer#GetCommand(buffer) abort
- let l:path = ale#path#FindNearestFile(a:buffer, '.packages')
-
- return '%e'
- \ . (!empty(l:path) ? ' --packages ' . ale#Escape(l:path) : '')
- \ . ' %s'
-endfunction
-
-function! ale_linters#dart#dartanalyzer#Handle(buffer, lines) abort
- let l:pattern = '\v^ ([a-z]+) . (.+) at (.+):(\d+):(\d+) . (.+)$'
- let l:output = []
-
- for l:match in ale#util#GetMatches(a:lines, l:pattern)
- call add(l:output, {
- \ 'type': l:match[1] is# 'error' ? 'E' : 'W',
- \ 'text': l:match[6] . ': ' . l:match[2],
- \ 'lnum': str2nr(l:match[4]),
- \ 'col': str2nr(l:match[5]),
- \})
- endfor
-
- return l:output
-endfunction
-
-call ale#linter#Define('dart', {
-\ 'name': 'dartanalyzer',
-\ 'executable': {b -> ale#Var(b, 'dart_dartanalyzer_executable')},
-\ 'command': function('ale_linters#dart#dartanalyzer#GetCommand'),
-\ 'callback': 'ale_linters#dart#dartanalyzer#Handle',
-\ 'lint_file': 1,
-\})
diff --git a/doc/ale-dart.txt b/doc/ale-dart.txt
index a046808b..4824e82e 100644
--- a/doc/ale-dart.txt
+++ b/doc/ale-dart.txt
@@ -87,39 +87,6 @@ g:ale_dart_format_options *g:ale_dart_format_options*
This variable can be set to pass additional options to the dart format fixer.
-
-===============================================================================
-dartanalyzer *ale-dart-dartanalyzer*
-
-Installation
--------------------------------------------------------------------------------
-
-Install Dart via whatever means. `dartanalyzer` will be included in the SDK.
-
-You can add the SDK to `$PATH`, as described here:
-https://www.dartlang.org/tools/sdk
-
-If you have installed Dart on Linux, you can also try the following: >
- " Set the executable path for dartanalyzer to the absolute path to it.
- let g:ale_dart_dartanalyzer_executable = '/usr/lib/dart/bin/dartanalyzer'
-<
-... or similarly for wherever your Dart SDK lives. This should work without
-having to modify `$PATH`.
-
-ALE can only check for problems with `dartanalyzer` with the file on disk.
-See |ale-lint-file-linters|
-
-Options
--------------------------------------------------------------------------------
-
-g:ale_dart_dartanalyzer_executable *g:ale_dart_dartanalyzer_executable*
- *b:ale_dart_dartanalyzer_executable*
- Type: |String|
- Default: `'dartanalyzer'`
-
- This variable can be set to change the path to dartanalyzer.
-
-
===============================================================================
dartfmt *ale-dart-dartfmt*
diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt
index 16f18074..f93e0807 100644
--- a/doc/ale-supported-languages-and-tools.txt
+++ b/doc/ale-supported-languages-and-tools.txt
@@ -136,7 +136,6 @@ Notes:
* `analysis_server`
* `dart-analyze`!!
* `dart-format`!!
- * `dartanalyzer`!!
* `dartfmt`!!
* `language_server`
* desktop
diff --git a/doc/ale.txt b/doc/ale.txt
index 65439fb1..19a8dd2f 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -2785,7 +2785,6 @@ documented in additional help files.
analysis_server.......................|ale-dart-analysis_server|
dart-analyze..........................|ale-dart-analyze|
dart-format...........................|ale-dart-format|
- dartanalyzer..........................|ale-dart-dartanalyzer|
dartfmt...............................|ale-dart-dartfmt|
desktop.................................|ale-desktop-options|
desktop-file-validate.................|ale-desktop-desktop-file-validate|
diff --git a/supported-tools.md b/supported-tools.md
index 831440d8..1d7b7583 100644
--- a/supported-tools.md
+++ b/supported-tools.md
@@ -144,9 +144,8 @@ formatting.
* Dart
* [analysis_server](https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server)
* [dart-analyze](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) :floppy_disk:
- * [dart-format](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) :floppy_disk:
- * [dartanalyzer](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) :floppy_disk:
- * [dartfmt](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) :floppy_disk:
+ * [dart-format](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt)
+ * [dartfmt](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt)
* [language_server](https://github.com/natebosch/dart_language_server)
* desktop
* [desktop-file-validate](https://www.freedesktop.org/wiki/Software/desktop-file-utils/)
diff --git a/test/handler/test_dartanalyzer_handler.vader b/test/handler/test_dartanalyzer_handler.vader
deleted file mode 100644
index 954850c5..00000000
--- a/test/handler/test_dartanalyzer_handler.vader
+++ /dev/null
@@ -1,28 +0,0 @@
-Before:
- runtime ale_linters/dart/dartanalyzer.vim
-
-After:
- call ale#linter#Reset()
-
-Execute(Basic problems should be parsed correctly):
- AssertEqual
- \ [
- \ {
- \ 'type': 'E',
- \ 'text': 'expected_token: Expected to find ''}''',
- \ 'lnum': 5,
- \ 'col': 1,
- \ },
- \ {
- \ 'type': 'W',
- \ 'text': 'invalid_assignment: A value of type ''String'' can''t be assigned to a variable of type ''int''',
- \ 'lnum': 2,
- \ 'col': 16,
- \ },
- \ ],
- \ ale_linters#dart#dartanalyzer#Handle(bufnr(''), [
- \ 'Analyzing main.dart...',
- \ ' error • Expected to find ''}'' at main.dart:5:1 • expected_token',
- \ ' warning • A value of type ''String'' can''t be assigned to a variable of type ''int'' at main.dart:2:16 • invalid_assignment',
- \ '1 error and 1 warning found.',
- \ ])
diff --git a/test/linter/test_dartanalyzer.vader b/test/linter/test_dartanalyzer.vader
deleted file mode 100644
index 7275b187..00000000
--- a/test/linter/test_dartanalyzer.vader
+++ /dev/null
@@ -1,20 +0,0 @@
-Before:
- call ale#assert#SetUpLinterTest('dart', 'dartanalyzer')
-
-After:
- call ale#assert#TearDownLinterTest()
-
-Execute(The default command and executable should be correct):
- AssertLinter 'dartanalyzer', ale#Escape('dartanalyzer') . ' %s'
-
-Execute(The executable should be configurable):
- let g:ale_dart_dartanalyzer_executable = 'foobar'
-
- AssertLinter 'foobar', ale#Escape('foobar') . ' %s'
-
-Execute(The .packages file should be set if detected):
- call ale#test#SetFilename('../test-files/dart/foo')
-
- AssertLinter 'dartanalyzer', ale#Escape('dartanalyzer')
- \ . ' --packages ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/dart/.packages'))
- \ . ' %s'