Commit Graph

557 Commits

Author SHA1 Message Date
Alex Axthelm
b60a7224ab allow options to be set for lintr 2017-09-03 23:14:26 +01:00
Alex Axthelm
29ffd5134f Allow for lintr options 2017-09-03 23:14:26 +01:00
Jake Zimmerman
63e8946fc8 Detect and use CM files for smlnj (#884)
* Detect and use CM files for smlnj

* Split into two checkers

- one for CM projects
- one for single SML files

* Fix some typos

* Fix error caught by writing tests

We want to actually use `glob` to search in paths upwards from us.
(Previously we were just searching in the current directory every time!)

* Fix errors from former test run

* Write tests for GetCmFile and GetExecutableSmlnj

* Typo in 'smlnj/' fixture filenames
2017-09-03 19:56:14 +01:00
w0rp
7c2a5052a8 Fix #895 - Run Node.js scripts with node.exe instead of node on Windows 2017-08-31 13:12:24 +01:00
w0rp
ed9cdca127 Merge remote-tracking branch 'randrej/master' into c-clang-tidy 2017-08-30 22:08:41 +01:00
w0rp
40dca63891 Merge remote-tracking branch 'jclem/master' into tslint-rules 2017-08-30 21:21:03 +01:00
Jon Parise
f4c5d29c64 Add a linter for Apache Thrift IDL files
This linter works by invoking the `thrift` compiler with the buffer
contents and reporting any parser and code generation issues.

The handler rolls its own output-matching loop because we have the
(unfortunate) requirement of handling error output that spans multiple
lines.

Unit tests cover both the command callback and handler, and there is
initial documentation for all of the option variables.
2017-08-30 11:08:06 -07:00
Brayden Banks
d08d2dac79 Gradle support for javac
Based off of #745.
2017-08-29 15:39:23 -07:00
w0rp
b031531e79 #869 - Detect the shell dialect from the hashbang for shellcheck 2017-08-28 19:16:23 +01:00
w0rp
908e94622e #868 - Prefer cmd.js files for executing standard 2017-08-26 18:11:27 +01:00
w0rp
b9cf450684 Set the end column for some Vint problems 2017-08-26 17:23:20 +01:00
Michael
8f8d015dae Add pycodestyle Python linter support (#872)
Add a pycodestyle linter
2017-08-25 12:46:56 +01:00
w0rp
9d3bda4441 Merge pull request #865 from jez/erubis-linter
Add erubis linter
2017-08-22 10:33:08 +01:00
Jake Zimmerman
b356d56448 Add erubis linter
This linter works largely the same as the existing `erubylint` linter,
except it works with `erubis` instead of `erb` as the driving command.
2017-08-21 13:51:42 -07:00
w0rp
a3299bf03a Fix #864 - Use the user's configured executable for phpstan for executable() checks 2017-08-21 18:42:18 +01:00
w0rp
cc02eb8a5a #653 Show errors from other files for mypy 2017-08-20 17:43:42 +01:00
w0rp
4c6b58f70c Fix some indentation 2017-08-20 13:37:21 +01:00
Michiel Westerbeek
d646ebda72 Added new linter for GraphQL: gqlint (#863)
* Added new linter for GraphQL: GQLint

* added help-files
2017-08-20 13:36:46 +01:00
w0rp
7112776d1b #653 Update tslint to set the filename key for problems in other files 2017-08-20 00:05:15 +01:00
Dmitri Vereshchagin
b2d3764a18 Syntaxerl linter feature check (#861)
* Add feature check for SyntaxErl linter

* Escape SyntaxErl executable path in commands
2017-08-19 18:54:23 +01:00
w0rp
20e64fbae0 #860 Only enable the new option for setting the original filename for SyntaxErl if an option is on in ALE 2017-08-19 15:48:29 +01:00
Dmitri Vereshchagin
18cb9a725d Add original filename to SyntaxErl command 2017-08-19 17:18:48 +03:00
w0rp
41c4f3431c Fix #858 - Fix the stack ghc-mod command 2017-08-18 19:33:23 +01:00
w0rp
342e83db60 Include the ruleName for errors in tslint problems 2017-08-16 10:37:36 +01:00
Vo Anh Duy
626568d66d Make ghc-mod be awared of cabal file
Right now ghc-mod linter check temp file instead of current buffer,
which cause the problem that it can't detect cabal file and raise
missing package error.

To fix that we need to run ghc-mod check with actual path of the current
file and with ghc-mod option `--map-file` to redirect temp file source
code to actual one
2017-08-13 20:49:26 +08:00
w0rp
d5ae3201a4 Ban !=# and !=? from the codebase 2017-08-11 00:31:42 +01:00
Scott Bonds
322910dc0b Add linter for Idris (#838)
* Add linter for Idris

* Fix parsing warnings and column ranges in Idris linter

* Make Idris linter configurable. Fix help tag.
2017-08-10 21:09:58 +01:00
w0rp
b9f31621e4 Move --format=default in the flake8 command to the return value, and remove extra spaces in the tests 2017-08-10 09:58:32 +01:00
Matthew Grossman
fe95fcd357 Default flake8 to --format=default 2017-08-09 10:05:56 -07:00
w0rp
a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp
39ebb431b6 Document the PHP langserver integration 2017-08-07 13:08:51 +01:00
Andrej Radovic
70cd1d5a57 Fixed the comments, left only the doc URL 2017-08-06 13:14:09 +02:00
w0rp
593cafa18b Fix #823 - Write Windows files with CRLF 2017-08-05 20:17:25 +01:00
Andrej Radovic
a767578d44 Added clang-tidy for C, too.
A limited number of clang-tidy checks can be used with C, too. I pretty much
copied and refactored the C++ clang-tidy linter, and added some documentation
about C-compatible checks.
2017-08-05 16:42:28 +02:00
w0rp
d1023e9c2c Merge pull request #821 from verbitan/nagelfar
Add Tcl nagelfar linter
2017-08-03 23:40:09 +01:00
w0rp
09d50ebe31 Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to rls 2017-08-02 23:21:30 +01:00
Nick James
a3d2fb5688 Add Tcl nagelfar linter 2017-08-02 23:05:19 +01:00
w0rp
6e07cf5b12 Cover the PHP language server functions with Vader tests 2017-08-02 22:34:09 +01:00
w0rp
1356cf8e01 #517 Enable the PHP language server 2017-08-02 19:44:00 +01:00
Junegunn Choi
bc1cf285c2
Rubocop: Show cop name 2017-08-02 13:55:54 +09:00
w0rp
2c252c0f12 #517 - Get the Rust language server working in a basic way 2017-07-30 23:34:58 +01:00
w0rp
84af543907 Fix some bugs so the PHP language server will show errors at least once 2017-07-30 14:42:00 +01:00
w0rp
fa33faad9e #810 - Handle output which is not JSON in many linters 2017-07-27 00:45:25 +01:00
w0rp
ded1bc14df #810 Ignore output which isn't JSON for brakeman 2017-07-26 23:17:46 +01:00
w0rp
cd860e3e8d #517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters 2017-07-26 10:37:37 +01:00
w0rp
86297a7c65 Fix #804 - Do not run scalac for sbt files 2017-07-26 10:29:46 +01:00
Takano Akio
8ab632e6f2 Make executable and options configurable for hdevtools 2017-07-24 05:50:09 +00:00
w0rp
78e37dabb7 Fix #794 - Filter out any preceding lines of Flow output which aren't JSON 2017-07-22 19:21:30 +01:00
Jonathan Clem
6d732b9fb4 Remove trailing whitespace in tslint.vim 2017-07-21 16:09:45 -04:00
Jonathan Clem
710c3ee3d2 Use the tslint_rules_option variable 2017-07-21 15:59:16 -04:00
Jonathan Clem
8ea9044667 Add myself to authors for tslint.vim 2017-07-21 15:54:28 -04:00
Jonathan Clem
cddb26558f Add tslint support for rules directory option 2017-07-21 15:52:51 -04:00
w0rp
87616c5e91 #782 - Do not set the build directory for clang-tidy for header files, which does not work 2017-07-20 14:52:24 +01:00
w0rp
0b50ebb0f0 Fix #779 - Handle empty output for tslint 2017-07-19 10:26:03 +01:00
w0rp
235fc90e22 Fix #308 - Check Dart files with dartanalyzer 2017-07-18 23:57:33 +01:00
w0rp
aa94d0902a Fix #710 - Show hlint suggestions as info items, and include end line and column numbers 2017-07-18 13:14:02 +01:00
w0rp
a8a4df05e6 Fix #776 - Do not add ; echo for Windows for Flow 2017-07-18 11:46:59 +01:00
Matthew Turland
da410caff8 Add yaml swaglint linter (#771)
* Add yaml swaglint linter
2017-07-17 20:28:21 +01:00
w0rp
eab77b7072 #703 Add arguments to avoid generating plist files if no build directory is detected for clang-check 2017-07-17 10:19:08 +01:00
w0rp
3b1bc2bd13 Fix another executable callback typo 2017-07-17 00:19:33 +01:00
w0rp
92918fd841 Fix an executable_callback typo 2017-07-17 00:18:43 +01:00
w0rp
23ea62d40a #711 - Make the cpplint executable configurable 2017-07-17 00:17:59 +01:00
w0rp
3352a6c9df #711 - Make the clangtidy executable configurable 2017-07-17 00:07:18 +01:00
w0rp
fe70742bb9 #711 - Make the clangcheck executable configurable 2017-07-16 23:35:10 +01:00
w0rp
9e83878900 #711 - Make the gcc executables configurable 2017-07-16 22:41:15 +01:00
w0rp
58717e05a3 #711 - Make the cppcheck executables configurable 2017-07-16 22:11:43 +01:00
w0rp
54ff573174 #711 - Make the clang executables configurable 2017-07-16 21:37:10 +01:00
w0rp
bd5ff5b1e5 Merge pull request #774 from dmitrivereshchagin/syntaxerl-linter
Add SyntaxErl linter
2017-07-16 15:06:55 +01:00
Ardis
7d174b0056 Added phpstan linter for php. (#772)
* Added phpstan linter for php.
2017-07-16 15:04:25 +01:00
Dmitri Vereshchagin
1aea6a34ff Add SyntaxErl linter
These changes add [SyntaxErl][1] integration.  SyntaxErl is a syntax
checker tool for Erlang.

[1]: https://github.com/ten0s/syntaxerl
2017-07-16 15:35:21 +03:00
Kevin Kays
4c50aec79c Add scalastyle linter (#766)
* Add support for scalastyle

* Add scalastyle docs

* scalastyle support for column numbers

* off by one column

* Add tests for scalastyle command and handler

* update readme for scalastyle

* allow full scalastyle options instead of just config file

* fix indentation

* allow scalastyle config file in parent directories by a couple names.

* check for missing match args with empty

* remove echo

* use a for loop
2017-07-13 23:41:01 +01:00
w0rp
b50ae96413 #769 Ignore stderr output and output without JSON we can read for rubocop 2017-07-13 22:47:43 +01:00
Eddie Lebow
dcbb0ffee5 Rubocop: handle empty 'files' array in output
The handler previously assumed there would be at least one entry in the
'files' array in the output JSON. It looks like this in the normal case:

  "files":[{"path":"app/models/image.rb","offenses":[]}]

But if RuboCop's config excludes the specified input files, causing no
files to be linted, the output is emptier:

  "files":[]

This change causes the handler to treat that case correctly, and also
exit early if the reported offense_count is zero.
2017-07-12 19:53:58 -04:00
w0rp
5885954197 Fix #760 - Report problems with configuration files for rubocop 2017-07-12 22:41:06 +01:00
Eddie Lebow
bc32e24203 Add rails_best_practices handler (resolves #655) (#751)
* Move FindRailsRoot() to more general location

* Add rails_best_practices handler (resolves #655)

* Update documentation for rails_best_practices

Also add brakeman to *ale* documentation.

* rails_best_practices: allow overriding the executable

* rails_best_practices: format help correctly

* rails_best_practices: capture tool output on Windows
2017-07-12 10:43:47 +01:00
Sander van Harmelen
b2be833744 Fixup #756
The real fix was not using absolute paths anymore (so not expanding with the `:p` option). The regex was correct and should at least include the `^` character to make sure the string starts with the given path/filename and not references the path/filename in some error description.
2017-07-12 09:51:44 +02:00
w0rp
340c0bbac5 #756 Escape the paths used for the --include parameter for gometalinter, which uses RE2 2017-07-11 23:47:21 +01:00
Sander van Harmelen
5c7b55edec Make gometalinter work again
They changed their logic to use related paths instead of absoluut paths (see [here](a04df08be5 (diff-04424ed7c660c10495a54e8d11be89eaR253)))

This fixes the linter by also using relative paths…
2017-07-11 17:13:04 +02:00
Jake Zimmerman
768f761017 Prefer --fast for stack-build (#754)
* Vim scripts shouldn't have hyphens

Especially not ones that will be autoloaded. You can't have a hyphen in
a function name, so autoloading functions based on filename will fail.

* Add g:haskell_stack_build_options, default: --fast

If we're going to use the --fast option, we may as well go the whole 9
yards and let the user configure the 'stack build' flags.

* Create documentation for stack-build options
2017-07-11 13:05:13 +01:00
Michael Pardo
d787050fa8 Kotlin and general Gradle support. (#745) 2017-07-10 23:03:36 +01:00
w0rp
6a84605c57 Make every test set filenames and switch directories in the same way, and fix some missing escaping for the rubocop linter 2017-07-09 22:43:31 +01:00
Jake Zimmerman
b50a7318fb Add new Haskell linter (#742)
* Add stack-build linter for Haskell

The stack-build linter works better than the other two linters when
you're working with an entire Haskell project. It builds the project
entirely and reports any errors.

The other two Haskell GHC linters only work on single files, which can
result in spurious errors (for example, not being able to find imports).

* Document all available Haskell linters

* Split GHC checkers into separate files
2017-07-09 22:39:33 +01:00
w0rp
47ff514878 Fix some indentation 2017-07-09 15:50:36 +01:00
w0rp
025f3407d6 Simplify ale_linters#ruby#rubocop#GetType 2017-07-09 15:50:12 +01:00
Eddie Lebow
ab0e76dbd5 Use rubocop's JSON output format (resolves #339) (#738)
* Use rubocop's JSON output format (resolves #339)

Rubocop's emacs formatter seems to have changed format in some
not-so-ancient version. The JSON formatter should provide a more stable
interface than parsing lines with a regex.

The JSON formatter was introduced in mid-2013, so it should be safe to
assume available in any reasonably-modern environment. The oldest
currently-supported version of ruby (according to ruby-lang.org) was
not supported by rubocop until 2014.

* Rubocop: Use global function for GetType

* Rubocop: Use scope prefix in GetType

* Rubocop: Update command_callback test

* Rubocop: add end_col to Handle
2017-07-09 15:48:04 +01:00
Jonathan Boudreau
7def00d5a9 Use different reporter to support older versions of jscs (#737)
* Use different reporter to support older versions of jscs

* Add test and make more consistent with other code

* Add documentation for jscs

* Add more test coverage
2017-07-08 18:37:21 +01:00
w0rp
7ce960ae51 Fix #735 - Support old versions of Flow by only adding --respect-pragma for supported versions 2017-07-07 10:47:09 +01:00
w0rp
8315c0e337 Make the executable for gometalinter configurable 2017-07-07 00:10:30 +01:00
w0rp
b43413916d Initialize rubocop variables in one place 2017-07-06 22:47:07 +01:00
w0rp
a04e73ddbc #729 - Support running Python programs from virtualenv for Windows 2017-07-05 13:07:55 +01:00
Wil Thomason
6ab92af181 Correctly pass options to cpplint (#728)
* Fix option passing to cpplint
2017-07-05 10:14:43 +01:00
w0rp
bb293b297c Fix #216 - Filter out errors for other files for ansible-lint 2017-07-03 23:16:39 +01:00
w0rp
a1cf7f67a1 Fix #182 - Add support for lintr 2017-07-03 22:34:30 +01:00
w0rp
84b280b881 Fix #178 - Check Stylus files with stylelint 2017-07-03 16:57:39 +01:00
Chris Weyl
5a3cfbbdf5 Allow hadolint linter to run via docker image (#720)
* Add documentation for hadolint (doc/ale-hadolint.txt)

* Allow `hadolint` linter to run via docker image

These changes enable the `hadolint` linter to run via the author's
docker image, if present.   Three modes are supported:

 * never use docker;
 * always use docker; and
 * use docker as a failback.
2017-07-03 15:37:32 +01:00
w0rp
51f256e897 Remove the need for pointless callbacks for LSP linters 2017-07-02 13:25:36 +01:00
w0rp
857ca941d2 Support an 'stdio' type for linter defintions, and require a command for LSP connections via programs 2017-07-02 13:17:24 +01:00
Ryan
2330837747 Adjust output of luacheck linter to include error code (#717)
* linters/lua/luacheck: Show error code in message
2017-07-02 00:20:59 +01:00
Gabriel Sobrinho
29746d492e
Fix brakeman handler when there is no output 2017-07-01 11:18:21 -03:00
Chris Weyl
3f1cab3e7e Add profile, other options to the perlcritic linter (#675)
* Add profile, other options to the perlcritic linter
2017-06-29 13:08:51 +01:00