Commit Graph

146 Commits

Author SHA1 Message Date
Keith Smiley
4566bd65c9
Add python mypy support
This adds support for the official optional python typechecker.
2016-12-30 16:12:30 -08:00
w0rp
fcfd8d5f56 Merge pull request #232 from grzebiel/master
Added ability to reload compilation flags for c and c++
2016-12-26 13:28:43 +00:00
grzebiel
9767fd8732 Added ability to reload compilation flags for c and c++ after loading plugin 2016-12-24 00:18:14 +01:00
Heyward Fann
e46ef0ae19 Redirect go build output to /dev/null
Named file file will be created after ALE, this can redirect the output to /dev/null if go build failed.
2016-12-23 14:56:44 +08:00
dzhou121
55827a9493 add go build for build errors (#180)
* add go build for build errors

* Add go build to doc and README

* Improvement for Go build

Go build works on package level, so copy over the other files
that belong to the same package to the temp folder as well.

* revert back to simple go build

* change gobuild script var name
2016-12-22 12:10:21 +00:00
diartyz
6c0996eb9c [enhancement] add node_modules support for stylelint & htmlhint (#226)
* Add node_modules support for stylelint

* add node_modules support for htmlhint

* fix stdin

* update doc about stylelint & htmlhint
2016-12-22 11:39:01 +00:00
w0rp
771bfe3b18 #193 Fix a parsing error for parsing errors with eslint 2016-12-22 11:16:22 +00:00
Eric Lehner
bda6df61a0 Elm file filter & Windows bug fixes (#223)
* Filters out unrelated errors in Elm linter

The function now filters out errors that are unrelated to the file,
those that were found in imported modules.

It does this by comparing the temp directory environment variable to the
file name in the elm output. If the file begins with the temp directory,
then it sould be included (it's from the buffer).

* Changing output to '/dev/null'

Turns out the compiler only accepts /dev/null as an ignorable name. It's
hard-coded here
https://github.com/elm-lang/elm-make/blob/master/src/Flags.hs

Changing this allows Windows linting to work. Otherwise the compiler
errors when using "nul"

* Fixes for Windows

Should now be able to successfully handle Windows.

Windows seemed to not handle the ";" properly, so I switched it to "&&",
which probably should've been done anyway to prevent false positives.

Oddly, matchend(l:error.file, l:temp_dir), and various other regex
solutions, couldn't properly match the two. Subsetting did though, hence
the new solution.

* Applying corrections

Made the file check case-insensitive for Windows, case-sensitive for
Unix/non-windows.

Added comment explaining hard coding of 'dev/null'

* Spelling correction

* Minor corrections

Actually uses the is_file_buffer variable now, added space between the
if statements, and added space between '-'
2016-12-16 10:41:21 +00:00
w0rp
4ad5c4757c Merge pull request #221 from rob-b/improve-formatting-of-haskell-linters
Improve formatting of ghc and hlint haskell linters
2016-12-14 19:13:19 +00:00
Rob Berry
0ffef758ae Improve formatting of ghc and hlint haskell linters
For ghc, it seemed that the conditional

```
if l:corrected_lines[-1] =~# ': error:$'
    let l:line = substitute(l:line, '\v^\s+', ' ', '')
endif
```

was never being reached. It's actually better to unconditionally
collapse whitespace anyway and so I simply removed the conditional
check.

For hlint I added more information about the error. This changes the
reported error from `Error:` to something like:
` Error: Avoid lambda. Found: \ x -> foo x Why not: foo`
2016-12-14 12:50:14 +00:00
David Mohundro
3418faf054 Add support for Swift with swiftlint (#214)
* Add support for swift with swiftlint

* Fix issue by adding '.swift' file extension
2016-12-13 15:28:20 +00:00
w0rp
88f4598ea2 Fix the proeslint linter for plaintext files 2016-12-13 10:19:19 +00:00
Eric Lehner
70e379cc46 Add Elm linting via elm-make (#213)
* Add support for Elm linting

* Adding documentation for Elm

* Adjusting spacing

* Addressing concerns listed in pull request

Removed the s:FindRootDirectory function as it does not make much sense
in this context. Adjusted the rest of the code to handle the removal of
that function, including using the ale#util function to find the nearest
file.

Ensured that when an empty filepath is found, the code does not attempt
to change directories.

Ensured that the linter would take from stdin using the wrapper.
2016-12-13 09:06:04 +00:00
diartyz
725957de6e add stylelint support 2016-12-06 21:14:14 +08:00
Krystian Paszkiewicz
ff8f3673eb Fix proper extension handling for tslint 2016-12-05 08:42:00 +00:00
Andrew Balmos
35307c0585 LaTeX Linters (#190)
* Add chktex linter

* Alias plaintex to tex

* Add lacheck linter

Closes #179

* Add the chktex warning code

This very useful to have when you want to suppress lint warnings with LaTeX
comments. chktex tends to be a bit noisy so this often needed.

* lacheck: Make regex less specific

To be more robust future changes in `stdin-wrapper`
2016-12-04 22:19:06 +00:00
kyrisu
bbdff82aee Add support for tslint.json file detection in tslint (#198)
* Add support for tslint.json file detection in tslint

* Fix tslint.json path building for tslint
2016-12-04 22:17:22 +00:00
Po Shan Cheah
5636626da1 Add options variable for ruby-rubocop 2016-12-01 12:28:27 -05:00
w0rp
66b183e1ba Fix #188: Revert to and older version of the Haskell linter, which works better 2016-11-28 09:53:07 +00:00
poohzrn
900b4cdff3 Add Proselint (#185)
* Add Proselint
- Markdown
- Tex
- Text

* Use ale#handler#HandleUnixFormatAsWarning

* Indentation
2016-11-28 09:36:11 +00:00
Alexander "Ace" Olofsson
e03df80a09 Add puppet linters (#183)
* Start adding Puppet linters

* Use the correct output stream for puppet parser

* Finish Puppet and puppet-lint linters

* Add Puppet information to documentation
2016-11-25 12:00:07 +00:00
Andrey Popp
f7e6236fe8 Add ocaml linter: merlin (#177)
* Add ocaml linter: merlin

* Add docs for ocaml-merlin integration.

* Remove annoying error message from ocaml merlin linter

* Update doc to list merlin linter
2016-11-23 15:19:36 +00:00
Andrey Popp
d700da8cb8 Flow linter improvements (#176)
* Fix flow linter to provide filename of the buffer

Related #173

* Fix flow linter not to fail on empty response

* Various improvement to message parsing
2016-11-21 09:53:18 +00:00
Marius Gedminas
713a6910d4 Add g:ale_python_flake8_executable (#174)
* Add g:ale_python_flake8_executable

Closes #172.

* Add g:ale_python_flake8_args

* Always add - to flake8 invocations
2016-11-14 17:52:31 +00:00
w0rp
7669550ae2 Merge pull request #170 from mkusher/typescript_typecheck_linter
Add typecheck linter for typescript
2016-11-10 16:20:28 +00:00
Aleh Kashnikau
0a3faa60f7 removed useless echom from typecheck.vim 2016-11-10 18:48:09 +03:00
Aleh Kashnikau
2e5f3899d1 Add typecheck linter for typescript 2016-11-10 18:41:02 +03:00
delianides
8d5353831e
flow linting should only happen on flow typed files. 2016-11-03 15:51:49 -04:00
Edward Larkey
8632e6b4e0 Added support for foodcritic
Adding support the foodcritic linter for Chef files.
Listing all issues as warnings for now
Doesn't get in the way of rubocop linting if ft=ruby.chef
Updated documentation

Closes #127
2016-11-01 15:36:08 -05:00
Zach Perrault
4088347901 Add FlowType support (#157)
* Add `javascript/flow` linter

* Add documentation for flow

* Remove a line from the docs that was from eslint

* Only run if flow gives output; Correct link in doc

* Address PR feedback #157
2016-11-01 09:00:08 +00:00
mshr-h
e3a8829d67 Add support for clang for c 2016-10-31 14:38:13 +09:00
w0rp
629e6a3675 Merge pull request #153 from keith/ks/shellcheck
Choose shell dialect based on vim syntax
2016-10-30 09:24:39 +00:00
w0rp
c4ab4855b7 Merge pull request #155 from deathmaz/feature/htmlhint-args
Added options variable for htmlhint
2016-10-30 09:21:55 +00:00
deathmaz
9a4645fc7f Default stdin in htmlhint options 2016-10-28 12:42:55 +03:00
Keith Smiley
5fc2f8f6c0
Choose shell dialect based on vim syntax
Shellcheck is smart enough to check the shebang in a given file to
determine which dialect to use. Unfortunately this doesn't work for
files without shebangs, even if it might be apparent what dialect should
be used, such as "bashrc" or "foo.bash". Luckily `filetype.vim` defines
specific vars based on which shell dialect is being used based on a huge
list of conditions. With this change we take those into account for all
the types shellcheck supports, otherwise we fallback to letting it try
and decide.
2016-10-27 18:46:58 -07:00
Keith Smiley
86cc2aab71
Add pylint formatter
This customizes the output format of pylint in order to use the same
pep8 parser
2016-10-27 18:38:26 -07:00
deathmaz
5b56103c69 Added optoins variable for htmlhint 2016-10-27 18:31:49 +03:00
w0rp
b9428b7db0 Merge #139 - Add Markdown linting support 2016-10-24 20:40:24 +01:00
Alex Layton
95373ddab5 Add support for mlint, a MATLAB linter (#145)
* Add support for mlint, a MATLAB linter

* Fix mlint linter as requested

* Clean up leftover loaded flag for mlint
2016-10-24 20:32:52 +01:00
w0rp
226b4ed586 Add node_modules support for JSHint, and use the global config as a fallback. 2016-10-23 13:25:50 +01:00
w0rp
36461b69d7 Support loading eslint from node_modules, re issue #118. 2016-10-23 13:04:41 +01:00
Bjorn Neergaard
f49f615ef6
Add support for dot-seperate linters, improve linter tests
This PR first and formost implements support for dot-seperate filetypes,
a very trivial change.

This closes #132

But more importantly, this PR vastly improves the test quality for
`ale#linter#Get`. It enables us to reset the state of ale's internal
linter cache, to facilitate better testing, as well as making use of
mocked linters instead of depending on linters on disk (which may
change). In addition, a dummy linter is defined to test the autoloading
behavior.

Header guards were removed from all linters as:

* A: ale won't try and load linters if they already exist in memory
* B: we can't reset state for testing if they can't be loaded again
2016-10-21 21:02:20 -05:00
w0rp
216eadbcbe Merge pull request #133 from ehzShelter/master
Added c++14 standard support and POSIX API compile time linker flags and ISO c++14 atomic and thread library support…
2016-10-21 18:08:25 +01:00
ehzShelter
1e83489691 make it less verbose for c and cpp 2016-10-21 20:02:20 +06:00
w0rp
5eee70cf37 Merge pull request #129 from neersighted/ansible
Add ansible-lint support and factor out PEP8 handler
2016-10-21 09:21:50 +01:00
ehzShelter
ce3d79550d Added c++14 standard support and POSIX API compile time linker flags for avoiding annoying errors and warnings 2016-10-21 13:07:51 +06:00
w0rp
7a06d276c2 #131 Keep the error types in the message for eslint 2016-10-20 18:07:55 +01:00
Bjorn Neergaard
a2e4af1626
Document ansible-lint 2016-10-20 09:27:57 -05:00
Bjorn Neergaard
c34664120b
Add ansible-lint support and factor out PEP8 handler 2016-10-20 09:23:23 -05:00
Bart Libert
a34fb0a6a7 Add support for cppcheck (#126)
* Add support for cppcheck

* Fix vint error in cppcheck handler

* Add vader test for CppCheck format handler
2016-10-20 12:30:45 +01:00