#659 - Add options for Python fixers, and cut down on duplicated documentation

This commit is contained in:
w0rp
2017-06-18 11:03:31 +01:00
parent fb682be199
commit 629ff513ec
18 changed files with 287 additions and 217 deletions

View File

@@ -10,11 +10,7 @@ g:ale_css_stylelint_executable *g:ale_css_stylelint_executable*
Type: |String|
Default: `'stylelint'`
ALE will first discover the stylelint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of stylelint, set
|g:ale_css_stylelint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_css_stylelint_options *g:ale_css_stylelint_options*
@@ -30,10 +26,7 @@ g:ale_css_stylelint_use_global *g:ale_css_stylelint_use_global*
Type: |String|
Default: `0`
This variable controls whether or not ALE will search for a local path for
stylelint first. If this variable is set to `1`, then ALE will always use the
global version of stylelint, in preference to locally installed versions of
stylelint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -10,11 +10,7 @@ g:ale_handlebars_embertemplatelint_executable
Type: |String| *b:ale_handlebars_embertemplatelint_executable*
Default: `'ember-template-lint'`
ALE will look for ember-template-lint executable in ancestor node_modules
directory. When it cannot find it, this variable will be used instead.
If you wish to use only a globally installed version of ember-template-lint,
set |g:ale_handlebars_embertemplatelint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_handlebars_embertemplatelint_use_global
@@ -22,10 +18,7 @@ g:ale_handlebars_embertemplatelint_use_global
Type: |Number| *b:ale_handlebars_embertemplatelint_use_global*
Default: `0`
This variable controls whether or not ALE will search for a local
ember-template-lint executable first. If this variable is set to `1`, then
ALE will always use the global version of ember-template-lint, in preference
to version installed in local node_modules directory.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -5,6 +5,14 @@ ALE HTML Integration *ale-html-options*
-------------------------------------------------------------------------------
htmlhint *ale-html-htmlhint*
g:ale_html_htmlhint_executable *g:ale_html_htmlhint_executable*
*b:ale_html_htmlhint_executable*
Type: |String|
Default: `'htmlhint'`
See |ale-integrations-local-executables|
g:ale_html_htmlhint_options *g:ale_html_htmlhint_options*
*b:ale_html_htmlhint_options*
Type: |String|
@@ -13,27 +21,12 @@ g:ale_html_htmlhint_options *g:ale_html_htmlhint_options*
This variable can be changed to modify flags given to HTMLHint.
g:ale_html_htmlhint_executable *g:ale_html_htmlhint_executable*
*b:ale_html_htmlhint_executable*
Type: |String|
Default: `'htmlhint'`
ALE will first discover the htmlhint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of htmlhint, set
|g:ale_html_htmlhint_use_global| to `1`.
g:ale_html_htmlhint_use_global *g:ale_html_htmlhint_use_global*
*b:ale_html_htmlhint_use_global*
Type: |String|
Default: `0`
This variable controls whether or not ALE will search for a local path for
htmlhint first. If this variable is set to `1`, then ALE will always use the
global version of htmlhint, in preference to locally installed versions of
htmlhint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -31,14 +31,7 @@ g:ale_javascript_eslint_executable *g:ale_javascript_eslint_executable*
Type: |String|
Default: `'eslint'`
ALE will first discover the eslint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
This variable can be set to change the path to eslint. If you have eslint_d
installed, you can set this option to use eslint_d instead.
If you wish to use only a globally installed version of eslint, set
|g:ale_javascript_eslint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_javascript_eslint_options *g:ale_javascript_eslint_options*
@@ -54,10 +47,7 @@ g:ale_javascript_eslint_use_global *g:ale_javascript_eslint_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for a local path for
eslint first. If this variable is set to `1`, then ALE will always use the
global version of eslint, in preference to locally installed versions of
eslint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -68,11 +58,7 @@ g:ale_javascript_prettier_executable *g:ale_javascript_prettier_executable*
Type: |String|
Default: `'prettier'`
ALE will first discover the prettier path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of prettier set
|g:ale_javascript_prettier_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_javascript_prettier_options *g:ale_javascript_prettier_options*
@@ -88,9 +74,7 @@ g:ale_javascript_prettier_use_global *g:ale_javascript_prettier_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for a local path for
prettier first. If this variable is set to `1`, then ALE will always use the
global version of Prettier.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -102,11 +86,7 @@ g:ale_javascript_prettier_eslint_executable
Type: |String|
Default: `'prettier-eslint'`
ALE will first discover the prettier-eslint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of prettier-eslint set
|g:ale_javascript_prettier_eslint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_javascript_prettier_eslint_options
@@ -124,9 +104,7 @@ g:ale_javascript_prettier_eslint_use_global
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for a local path for
prettier-eslint first. If this variable is set to `1`, then ALE will always
use the global version of Prettier-eslint.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -137,11 +115,7 @@ g:ale_javascript_flow_executable *g:ale_javascript_flow_executable*
Type: |String|
Default: `'flow'`
ALE will first discover the flow path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of flow, set
|g:ale_javascript_flow_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_javascript_flow_use_global *g:ale_javascript_flow_use_global*
@@ -149,10 +123,7 @@ g:ale_javascript_flow_use_global *g:ale_javascript_flow_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for a local path for
flow first. If this variable is set to `1`, then ALE will always use the
global version of flow, in preference to locally installed versions of
flow in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -163,13 +134,7 @@ g:ale_javascript_jshint_executable *g:ale_javascript_jshint_executable*
Type: |String|
Default: `'jshint'`
ALE will first discover the jshint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
This variable can be changed to change the path to jshint.
If you wish to use only a globally installed version of jshint, set
|g:ale_javascript_jshint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_javascript_jshint_use_global *g:ale_javascript_jshint_use_global*
@@ -177,10 +142,7 @@ g:ale_javascript_jshint_use_global *g:ale_javascript_jshint_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for a local path for
jshint first. If this variable is set to `1`, then ALE will always use the
global version of jshint, in preference to locally installed versions of
jshint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -191,9 +153,7 @@ g:ale_javascript_standard_executable *g:ale_javascript_standard_executable*
Type: |String|
Default: `'standard'`
Same as the eslint option.
See: |g:ale_javascript_eslint_executable|
See |ale-integrations-local-executables|
g:ale_javascript_standard_options *g:ale_javascript_standard_options*
@@ -209,9 +169,7 @@ g:ale_javascript_standard_use_global *g:ale_javascript_standard_use_global*
Type: |Number|
Default: `0`
Same as the eslint option.
See: |g:ale_javascript_eslint_use_global|
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -222,9 +180,7 @@ g:ale_javascript_xo_executable *g:ale_javascript_xo_executable*
Type: |String|
Default: `'xo'`
Same as the eslint option.
See: |g:ale_javascript_eslint_executable|
See |ale-integrations-local-executables|
g:ale_javascript_xo_options *g:ale_javascript_xo_options*
@@ -240,9 +196,7 @@ g:ale_javascript_xo_use_global *g:ale_javascript_xo_use_global*
Type: |Number|
Default: `0`
Same as the eslint option.
See: |g:ale_javascript_eslint_use_global|
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -17,6 +17,33 @@ g:ale_virtualenv_dir_names *g:ale_virtualenv_dir_names*
the directory containing the Python file to find virtualenv paths.
-------------------------------------------------------------------------------
autopep8 *ale-python-autopep8*
g:ale_python_autopep8_executable *g:ale_python_autopep8_executable*
*b:ale_python_autopep8_executable*
Type: |String|
Default: `'autopep8'`
See |ale-integrations-local-executables|
g:ale_python_autopep8_options *g:ale_python_autopep8_options*
*b:ale_python_autopep8_options*
Type: |String|
Default: `''`
This variable can be set to pass extra options to autopep8.
g:ale_python_autopep8_use_global *g:ale_python_autopep8_use_global*
*b:ale_python_autopep8_use_global*
Type: |Number|
Default: `0`
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
flake8 *ale-python-flake8*
@@ -58,6 +85,25 @@ g:ale_python_flake8_use_global *g:ale_python_flake8_use_global*
Both variables can be set with `b:` buffer variables instead.
-------------------------------------------------------------------------------
isort *ale-python-isort*
g:ale_python_isort_executable *g:ale_python_isort_executable*
*b:ale_python_isort_executable*
Type: |String|
Default: `'isort'`
See |ale-integrations-local-executables|
g:ale_python_isort_use_global *g:ale_python_isort_use_global*
*b:ale_python_isort_use_global*
Type: |Number|
Default: `0`
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
mypy *ale-python-mypy*
@@ -66,7 +112,7 @@ g:ale_python_mypy_executable *g:ale_python_mypy_executable*
Type: |String|
Default: `'mypy'`
This variable can be changed to modify the executable used for mypy.
See |ale-integrations-local-executables|
g:ale_python_mypy_options *g:ale_python_mypy_options*
@@ -83,11 +129,7 @@ g:ale_python_mypy_use_global *g:ale_python_mypy_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for mypy in a
virtualenv directory first. If this variable is set to `1`, then ALE will
always use |g:ale_python_mypy_executable| for the executable path.
Both variables can be set with `b:` buffer variables instead.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------
@@ -98,7 +140,7 @@ g:ale_python_pylint_executable *g:ale_python_pylint_executable*
Type: |String|
Default: `'pylint'`
This variable can be changed to modify the executable used for pylint.
See |ale-integrations-local-executables|
g:ale_python_pylint_options *g:ale_python_pylint_options*
@@ -126,11 +168,26 @@ g:ale_python_pylint_use_global *g:ale_python_pylint_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for pylint in a
virtualenv directory first. If this variable is set to `1`, then ALE will
always use |g:ale_python_pylint_executable| for the executable path.
See |ale-integrations-local-executables|
Both variables can be set with `b:` buffer variables instead.
-------------------------------------------------------------------------------
yapf *ale-python-yapf*
g:ale_python_yapf_executable *g:ale_python_yapf_executable*
*b:ale_python_yapf_executable*
Type: |String|
Default: `'yapf'`
See |ale-integrations-local-executables|
g:ale_python_yapf_use_global *g:ale_python_yapf_use_global*
*b:ale_python_yapf_use_global*
Type: |Number|
Default: `0`
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -10,11 +10,7 @@ g:ale_sass_stylelint_executable *g:ale_sass_stylelint_executable*
Type: |String|
Default: `'stylelint'`
ALE will first discover the stylelint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of stylelint, set
|g:ale_sass_stylelint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_sass_stylelint_use_global *g:ale_sass_stylelint_use_global*
@@ -22,10 +18,7 @@ g:ale_sass_stylelint_use_global *g:ale_sass_stylelint_use_global*
Type: |String|
Default: `0`
This variable controls whether or not ALE will search for a local path for
stylelint first. If this variable is set to `1`, then ALE will always use the
global version of stylelint, in preference to locally installed versions of
stylelint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -10,11 +10,7 @@ g:ale_scss_stylelint_executable *g:ale_scss_stylelint_executable*
Type: |String|
Default: `'stylelint'`
ALE will first discover the stylelint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of stylelint, set
|g:ale_scss_stylelint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_scss_stylelint_use_global *g:ale_scss_stylelint_use_global*
@@ -22,10 +18,7 @@ g:ale_scss_stylelint_use_global *g:ale_scss_stylelint_use_global*
Type: |String|
Default: `0`
This variable controls whether or not ALE will search for a local path for
stylelint first. If this variable is set to `1`, then ALE will always use the
global version of stylelint, in preference to locally installed versions of
stylelint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -10,11 +10,7 @@ g:ale_typescript_tslint_executable *g:ale_typescript_tslint_executable*
Type: |String|
Default: `'tslint'`
ALE will first discover the tslint path in an ancestor node_modules
directory. If no such path exists, this variable will be used instead.
If you wish to use only a globally installed version of tslint, set
|g:ale_typescript_tslint_use_global| to `1`.
See |ale-integrations-local-executables|
g:ale_typescript_tslint_config_path *g:ale_typescript_tslint_config_path*
@@ -31,10 +27,7 @@ g:ale_typescript_tslint_use_global *g:ale_typescript_tslint_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for a local path for
tslint first. If this variable is set to `1`, then ALE will always use the
global version of tslint, in preference to locally installed versions of
tslint in node_modules.
See |ale-integrations-local-executables|
-------------------------------------------------------------------------------

View File

@@ -70,9 +70,12 @@ CONTENTS *ale-contents*
phpcs...............................|ale-php-phpcs|
phpmd...............................|ale-php-phpmd|
python................................|ale-python-options|
autopep8............................|ale-python-autopep8|
flake8..............................|ale-python-flake8|
isort...............................|ale-python-isort|
mypy................................|ale-python-mypy|
pylint..............................|ale-python-pylint|
yapf................................|ale-python-yapf|
ruby..................................|ale-ruby-options|
reek................................|ale-ruby-reek|
rubocop.............................|ale-ruby-rubocop|
@@ -177,7 +180,7 @@ The following languages and tools are supported.
* Pod: 'proselint'
* Pug: 'pug-lint'
* Puppet: 'puppet', 'puppet-lint'
* Python: 'flake8', 'mypy', 'pylint'
* Python: 'autopep8', 'flake8', 'isort', 'mypy', 'pylint', 'yapf'
* ReasonML: 'merlin'
* reStructuredText: 'proselint'
* RPM spec: 'spec'
@@ -871,6 +874,28 @@ Every option for programs can be set globally, or individually for each
buffer. For example, `b:ale_python_flake8_executable` will override any
values set for `g:ale_python_flake8_executable`.
*ale-integrations-local-executables*
Some tools will prefer to search for locally-installed executables, unless
configured otherwise. For example, the `eslint` linter will search for
various executable paths in `node_modules`. The `flake8` linter will search
for virtualenv directories.
If you prefer to use global executables for those tools, set the relevant
`_use_global` and `_executable` options for those linters. >
" Use the global executable with a special name for eslint.
let g:ale_javascript_eslint_executable = 'special-eslint'
let g:ale_javascript_eslint_use_global = 1
" Use the global executable with a special name for flake8.
let g:ale_python_flake8_executable = '/foo/bar/flake8'
let g:ale_python_flake8_use_global = 1
<
The option |g:ale_virtualenv_dir_names| controls the local virtualenv paths
ALE will use to search for Python executables.
===============================================================================
6. Commands/Keybinds *ale-commands*