summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Emmott <fe@fb.com>2018-08-02 13:09:51 -0700
committerFred Emmott <fe@fb.com>2018-08-02 13:50:56 -0700
commita728f074f727ad9aac0d6947f7b81d26078c0fb6 (patch)
tree23183f735de3a9cb1ca99e9fe212af16a68605df
parentde6cd961a83674ef1a73d4c4e9a1b9ccc73ec941 (diff)
downloadale-a728f074f727ad9aac0d6947f7b81d26078c0fb6.zip
Disable HHAST by default
it executes $PROJECT/vendor/bin/hhast, so that's not a good idea.
-rw-r--r--README.md2
-rw-r--r--autoload/ale/linter.vim2
-rw-r--r--doc/ale-hack.txt9
-rw-r--r--doc/ale.txt1
4 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 07de881d..dd311b55 100644
--- a/README.md
+++ b/README.md
@@ -126,7 +126,7 @@ formatting.
| GLSL | [glslang](https://github.com/KhronosGroup/glslang), [glslls](https://github.com/svenstaro/glsl-language-server) |
| Go | [gofmt](https://golang.org/cmd/gofmt/), [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports), [go vet](https://golang.org/cmd/vet/) !!, [golint](https://godoc.org/github.com/golang/lint), [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) !!, [gometalinter](https://github.com/alecthomas/gometalinter) !!, [go build](https://golang.org/cmd/go/) !!, [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) !!, [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) !! |
| GraphQL | [eslint](http://eslint.org/), [gqlint](https://github.com/happylinks/gqlint), [prettier](https://github.com/prettier/prettier) |
-| Hack | [hack](http://hacklang.org/), [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt), [hhast](https://github.com/hhvm/hhast) |
+| Hack | [hack](http://hacklang.org/), [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt), [hhast](https://github.com/hhvm/hhast) (disabled by default; see `:help ale-integration-hack`) |
| Haml | [haml-lint](https://github.com/brigade/haml-lint) |
| Handlebars | [ember-template-lint](https://github.com/rwjblue/ember-template-lint) |
| Haskell | [brittany](https://github.com/lspitzner/brittany), [ghc](https://www.haskell.org/ghc/), [cabal-ghc](https://www.haskell.org/cabal/), [stack-ghc](https://haskellstack.org/), [stack-build](https://haskellstack.org/) !!, [ghc-mod](https://github.com/DanielG/ghc-mod), [stack-ghc-mod](https://github.com/DanielG/ghc-mod), [hlint](https://hackage.haskell.org/package/hlint), [hdevtools](https://hackage.haskell.org/package/hdevtools), [hfmt](https://github.com/danstiner/hfmt) |
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'],
diff --git a/doc/ale-hack.txt b/doc/ale-hack.txt
index a8027424..4776b8cf 100644
--- a/doc/ale-hack.txt
+++ b/doc/ale-hack.txt
@@ -1,5 +1,14 @@
===============================================================================
ALE Hack Integration *ale-hack-options*
+ *ale-integration-hack*
+
+ HHAST is disabled by default, as it executes code in the project root.
+
+ Currently linters must be enabled globally. HHAST can be enabled with:
+
+>
+ let g:ale_linters = {'hack': ['hack', 'hhast']}
+<
===============================================================================
hack *ale-hack-hack*
diff --git a/doc/ale.txt b/doc/ale.txt
index b60c3da0..c360d3bd 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -1214,6 +1214,7 @@ g:ale_linters *g:ale_linters*
{
\ 'csh': ['shell'],
\ 'go': ['gofmt', 'golint', 'go vet'],
+ \ 'hack': ['hack'],
\ 'help': [],
\ 'perl': ['perlcritic'],
\ 'python': ['flake8', 'mypy', 'pylint'],