summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-08-02 21:58:57 +0100
committerGitHub <noreply@github.com>2018-08-02 21:58:57 +0100
commit9ef266d050d698c3ed3be3456ce6a5da5755d5ef (patch)
tree6e3d82e5df785173b6f067ddfd4b32a75fb9cef6 /autoload
parent94270402cb5c28017061c383c40dff89008d0125 (diff)
parenta728f074f727ad9aac0d6947f7b81d26078c0fb6 (diff)
downloadale-9ef266d050d698c3ed3be3456ce6a5da5755d5ef.zip
Merge pull request #1770 from fredemmott/hack
Split Hack out from PHP, modernize
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix/registry.vim2
-rw-r--r--autoload/ale/fixers/hackfmt.vim8
-rw-r--r--autoload/ale/linter.vim2
3 files changed, 7 insertions, 5 deletions
diff --git a/autoload/ale/fix/registry.vim b/autoload/ale/fix/registry.vim
index dc34e4c5..e60d67b6 100644
--- a/autoload/ale/fix/registry.vim
+++ b/autoload/ale/fix/registry.vim
@@ -157,7 +157,7 @@ let s:default_registry = {
\ },
\ 'hackfmt': {
\ 'function': 'ale#fixers#hackfmt#Fix',
-\ 'suggested_filetypes': ['php'],
+\ 'suggested_filetypes': ['hack'],
\ 'description': 'Fix Hack files with hackfmt.',
\ },
\ 'hfmt': {
diff --git a/autoload/ale/fixers/hackfmt.vim b/autoload/ale/fixers/hackfmt.vim
index b5bf0dc5..bf2d4f71 100644
--- a/autoload/ale/fixers/hackfmt.vim
+++ b/autoload/ale/fixers/hackfmt.vim
@@ -1,12 +1,12 @@
" Author: Sam Howie <samhowie@gmail.com>
" Description: Integration of hackfmt with ALE.
-call ale#Set('php_hackfmt_executable', 'hackfmt')
-call ale#Set('php_hackfmt_options', '')
+call ale#Set('hack_hackfmt_executable', 'hackfmt')
+call ale#Set('hack_hackfmt_options', '')
function! ale#fixers#hackfmt#Fix(buffer) abort
- let l:executable = ale#Var(a:buffer, 'php_hackfmt_executable')
- let l:options = ale#Var(a:buffer, 'php_hackfmt_options')
+ let l:executable = ale#Var(a:buffer, 'hack_hackfmt_executable')
+ let l:options = ale#Var(a:buffer, 'hack_hackfmt_options')
return {
\ 'command': ale#Escape(l:executable)
diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim
index 683d506a..ab86d77e 100644
--- a/autoload/ale/linter.vim
+++ b/autoload/ale/linter.vim
@@ -26,11 +26,13 @@ let s:default_ale_linter_aliases = {
"
" Only cargo is enabled for Rust by default.
" rpmlint is disabled by default because it can result in code execution.
+" hhast is disabled by default because it executes code in the project root.
"
" NOTE: Update the g:ale_linters documentation when modifying this.
let s:default_ale_linters = {
\ 'csh': ['shell'],
\ 'go': ['gofmt', 'golint', 'go vet'],
+\ 'hack': ['hack'],
\ 'help': [],
\ 'perl': ['perlcritic'],
\ 'python': ['flake8', 'mypy', 'pylint'],