Add ktlint support (without formatting) for kotlin filetype (#610)

* Add ktlint support (without formatting) for kotlin filetype

* Fix code style and refactor to use ALE utility functions (GetMatches)

* Remove options for configuration file

* Refactor: Rename exec variable and use ale#Set for variable configuration
This commit is contained in:
Francis Agyapong
2017-06-02 12:41:46 -06:00
committed by w0rp
parent 7c68889bbc
commit 2c89a4c98a
3 changed files with 80 additions and 1 deletions

View File

@@ -62,4 +62,29 @@ g:ale_kotlin_kotlinc_module_filename *g:ale_kotlin_kotlinc_module_filename*
The filename of the module file that the linter should pass to the kotlin
compiler.
-------------------------------------------------------------------------------
ktlint *ale-kotlin-ktlint*
g:ale_kotlin_ktlint_executable *g:ale_kotlin_ktlint_executable*
Type: |String|
Default: `''`
The Ktlint executable.
Posix-compliant shell scripts are the only executables that can be found on
Ktlint's github release page. If you are not on such a system, your best
bet will be to download the ktlint jar and set this option to something
similar to `'java -jar /path/to/ktlint.jar'`
g:ale_kotlin_ktlint_rulesets *g:ale_kotlin_ktlint_rulesets*
Type: |List| of |String|s
Default: []
This list should contain paths to ruleset jars and/or strings of maven
artifact triples. Example:
>
let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom-rulset.jar',
'com.ktlint.rulesets:mycustomrule:1.0.0']
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: