Commit Graph

376 Commits

Author SHA1 Message Date
Ben R
0ce46fe7c8 Make go build linter check files on disk (#465)
* #418 Make `go build` linter check files on disk

* Omit errors from imported go packages
2017-04-12 10:53:33 +01:00
w0rp
b06b832447 #392 Report errors inside of headers, in a very basic way 2017-04-11 20:32:57 +01:00
w0rp
8b890caa31 Merge pull request #458 from Szero/master
Added shellcheck executable and options variable
2017-04-11 09:26:58 +01:00
David Alexander
593dbe7556 Typo correcting 3.0.7 -> 0.3.7 for vint --no-color 2017-04-10 16:44:14 -04:00
Szero
8e33abaeab added shellcheck executable and options variable
updated docs
2017-04-09 19:54:25 +02:00
Mathijs Saey
588d338342 Added a missing space to the nimcheck command 2017-04-08 20:32:47 +02:00
Brandon Roehl
4e40e8cb60 Add Ruby MRI linter (#453)
* Added ruby mri linter

* Added to the list of supported linters

* Async and now with 4 spaces

* Vader tests for ruby

* Match style choices

* Vader test for the Ruby handler now works and passes
2017-04-08 11:24:20 +01:00
Shalom Yiblet
cc8eb05860 improved the sml linter (#445)
* improved the sml linter

* made matching operator agnostic to user settings

* added tests for sml
2017-04-08 11:23:11 +01:00
Mathijs Saey
434283ed1a Update nimcheck.vim (#451)
Added a '--threads:on' switch to the nim check command so that it doesn't produce errors when using one of the various modules that require threads.
2017-04-07 15:42:46 +01:00
Adrian
d28d7f732a Add support for linting Handlebars templates with ember-template-lint (#452)
* Ember-template-lint Handlebars template linter: initial handler, test.

* Handlebars support with ember-template-lint: basic documentation entries.
2017-04-07 15:38:50 +01:00
José Júnior
4caf273d53 Adds options to foodcritic linter (#437)
* Adds options to foodcritic linter

Adds a way to pass command line options to the foodcritic command and
documentation about it.

* Creates a simple test for foodcritic command callback

This test simply runs the GetCommand function for the foodcritic linter
and feeds it with some test variables to assert the command line is
being created/escaped correctly.

* Makes foodcritic linter use a command callback

Following review comments, changes the foodcritic linter to use a
`GetCommand` callback for the `command_callback` linter option.

Makes sure that `~` are escaped: flags on foodcritic command line are
negated by adding a `~` in front of the specific cop name:

```
foodcritic -t ~FC011
```

But the way the commands are executed cause foodcritic to fail (since
tilde is recognized as home directory).

* Fixes the doc to include new variables
2017-04-05 18:21:47 +01:00
w0rp
f3fa8db4cf #447 Pass a temporary file to the shell linter instead 2017-04-03 23:11:25 +01:00
w0rp
4fc8452838 #447 Support zsh in the shell linter 2017-04-03 22:51:39 +01:00
w0rp
7c736579b7 Fix #438 Create Java .class files for javac in a temporary directory 2017-03-31 20:14:53 +01:00
Adriaan Zonnenberg
4b0f3257dd Remove 'col' from linters where it is hardcoded to 1 (#434)
* Remove 'col' from linters where it is hardcoded to 1

When 'col' is 1, the first column will get highlighted for no reason. It
should be 0 (which is the default).

In the scalac linter there was also a check about the outcome of
`stridx`. It would set l:col to 0 if it was -1, and then it uses
`'col': l:col + 1` to convert the outcome of `stridx` to the actual
column number. This will make 'col' equals 1 when there is no match. We
can remove the check because `-1 + 1 = 0`.

* Remove outdated comments about vcol

vcol was added as a default, and the loclists that follow these comments
do not contain 'vcol' anymore
2017-03-30 23:33:38 +01:00
Ben Reedy
43f24f4c01
Add support for gosimple and staticcheck 2017-03-30 11:49:52 +10:00
w0rp
2a88b60ff1 Fix #260 automatically set .csslintrc files from ancestor directories 2017-03-29 00:56:39 +01:00
w0rp
8e71f233da Use the lint_file option so the Cargo linter will only be run against files on disk 2017-03-29 00:34:03 +01:00
w0rp
3f5cb55e73 Make the tslint file match the style in the rest of the codebase 2017-03-29 00:28:01 +01:00
w0rp
a4220b99a6 Fix #421 Automatically detect create-react-app paths 2017-03-29 00:21:27 +01:00
Gabriel Holodak
b9c078da20 Adjust rubocop error levels
Consider rubocop fatal errors as ALE errors, and rubocop style warnings
as ALE warnings.
2017-03-27 19:46:02 +01:00
w0rp
5de084557b Merge branch 'add-dogma' 2017-03-27 12:57:00 +01:00
w0rp
82fde0ea51 Use the same formatting as other files for the dogma linter file, and cover the Handler function with tests 2017-03-27 12:56:54 +01:00
Idan Arye
2f40953e03 Make cargo linter lighter: (#408)
- Use `cargo check` instead of `cargo build` when
  `g:ale_rust_cargo_use_check` is truish.
- Use `--frozen` to avoid locking the project.
2017-03-27 12:37:00 +01:00
Lucas Kolstad
d84d91ff35 Add support for ASM files using GCC 2017-03-25 16:36:17 -07:00
Blaž Hrastnik
ba97017380 Add the dogma checker. 2017-03-23 01:13:33 +09:00
baabelfish
9f3cdf8270 Fix problems with nim check (#404)
* Fix problems with nim check

- Multi file errors are not shown in the same buffer
- Fixes parsing of error type that contain ':'

* Remove redundant fnameescape
2017-03-22 09:11:32 +00:00
Ruben Paz
5122dc498d tslint parameterized executable and config path (#400)
* Allow modifying the location of the tsling executable

* Allow definition of config file path

* fnameescape configuration file
2017-03-21 12:30:32 +00:00
baabelfish
297bc8553c Add support for nim check 2017-03-18 19:45:37 +02:00
Markus Doits
fae26369d4 add slim-lint (#388)
* add slim-lint

* add slim readme entry

* add slim entry to doc

* add slimlint vader test
2017-03-13 23:21:59 +00:00
w0rp
3f3d8b0014 Merge pull request #393 from naoina/fix-coffeelint-pattern
Fix pattern of output for coffeelint
2017-03-13 23:18:06 +00:00
Naoya Inada
e969d97843
Fix pattern of output for coffeelint 2017-03-13 20:09:49 +09:00
w0rp
a4ae5ca997 Merge pull request #389 from jparise/erlc-output-tmpdir
Write erlc output files to the temporary directory
2017-03-12 16:50:17 +00:00
Jon Parise
f3eab445ee Use tempname() to create the temporary output file
Also, "manage" this filename so ALE can clean it up.
2017-03-11 19:33:32 -08:00
w0rp
ca78e4c150 Support older versions of Vint 2017-03-11 19:45:33 +00:00
w0rp
d58a18b8ed #277 #318 Support all same-directory includes for gcc and clang 2017-03-11 16:48:49 +00:00
Paul Johnson
c2ceb9e085 FIX #344 - Add options to Perl linter
Conflicts:
	doc/ale.txt
2017-03-11 14:53:30 +00:00
Jon Parise
7d6b313065 Write erlc output files to the temporary directory
In particular, if we're working with a leex (.xrl) or yecc (.yrl) source
file, erlc would otherwise generate the corresponding .erl file in the
current directory (often the project root), which is generally not what
we want.

Unconditionally writing erlc output to a temporary directory also
matches Flycheck's behavior.
2017-03-10 08:24:21 -08:00
w0rp
3cababc83b Fix #386 report problems with eslint configuration files 2017-03-09 21:05:00 +00:00
Alistair Bill
be57b545b7 Add support for nix linting 2017-03-05 20:36:29 +00:00
w0rp
c1947d13cf #384 Try and stop stupid errors coming from the gobuild functions 2017-03-04 23:34:57 +00:00
Patrick Lewis
9e9e15bc87 Add hamllint linter for Haml (#377)
* Add hamllint linter for Haml

* Simplify hamllint
2017-03-03 20:27:07 +00:00
Jasper Woudenberg
70711022db Add support for error details
Some review needed.
2017-03-01 23:27:48 -08:00
Daniel M. Capella
18508f7453 proselint: Add more supported filetypes (#367)
* proselint: Add more suported filetypes

* proselint: Minor consistency fixes

* Vim help: Disable linters by default
2017-03-02 00:06:09 +00:00
Adriaan Zonnenberg
6befe9e37c Fix PHP column matching for unexpected single quotes (#370)
* PHP: Fix column matching for unexpected single quotes

Unexpected single quotes resulted in an empty match, because PHP
surrounds the errors with quotes, and we check for the next quote to be
the ending delimiter.

For example: an unexpected string 'foo' would be presented as
`unexpected ''foo''`, and then the match would be `''`. The inner part
of that match is an empty string.

This adds a check for the keyword "expecting". Any quote after
"expecting" won't be matched, so we can use greedy matching instead of
non-greedy.

* PHP: Use "very magic"

The pattern started to get unreadable

Also replaced non-greedy matching (`\{-}`) by greedy matching, because
we don't need to match non-greedily anymore and it reads a little nicer.

* PHP: Add tests for column matches

And with that, also a test for unexpected single quotes.
2017-03-01 23:26:03 +00:00
equal-l2
4fa52fd98a Use latest C++ standard 2017-03-01 02:42:35 +09:00
w0rp
7a92c3a046 Merge pull request #366 from kbenzie/cmakelint
Add cmakelint support for cmake filetype
2017-02-27 22:21:42 +00:00
w0rp
b2fe1b2567 Copy all loclist items returned from handlers, and set up defaults for convenience 2017-02-26 14:51:22 +00:00
John Sivak
9c93e79a66 Add display of the pylint symbol name for the msg_id. 2017-02-25 13:23:36 -05:00
Kenneth Benzie (Benie)
b5e603bbc5 Add cmakelint support for cmake filetype 2017-02-25 17:27:03 +00:00
Jon Parise
c2c6c9f491 Fix Credo's line-matching pattern (#360)
* Fix Credo's line-matching pattern

In d3e7d3d5, the line matching pattern was changed to handle filenames
other than `stdin`. Unfortunately, this broke the pattern's ability to
reliably extract both line and column numbers because the latter is an
optional match and the filename portion was very greedy. This resulted
in line numbers being discarded (treated as part of the filename) and
column numbers being interpreted as line numbers.

This change simplifies the pattern to only anchor on the line's suffix,
ignoring the filename portion entirely.

Alternatively, we could use vim's `\f` ("file name characters") class,
but that could still run into problems when `:`'s naturally appear in
the filename.

* Add a Vader test case for the Credo handler
2017-02-22 23:33:05 +00:00
Chris Paul
fef3276f34 escape dot in maker regex (#357)
* escape dot in maker regex

* Create test_typecheck_handler

* Rename test_typecheck_handler to test_typecheck_handler.vader
2017-02-21 20:32:37 +00:00
w0rp
1a9c8b8d06 Merge pull request #353 from pauloalem/master
Add sml support via smlnj
2017-02-21 12:10:48 +00:00
w0rp
3786322cf0 Merge remote-tracking branch 'adriaanzon/php-columns' 2017-02-21 11:34:39 +00:00
w0rp
8eca101fd1 Merge pull request #348 from rob-b/add-hdevtools-linter
Add hdevtools linter for haskell
2017-02-21 11:09:15 +00:00
paulo alem
677e55df0f Add sml support via smlnj 2017-02-18 00:05:33 -02:00
Adriaan Zonnenberg
cca0222cf1 PHP: Make parser work with more error messages 2017-02-18 00:51:33 +01:00
Rob Berry
06fe8a043f Add hdevtools linter for haskell
This adds support for the hdevtools haskell linter
https://github.com/hdevtools/hdevtools

The output for hdevtools is near identical to the ghc output so this
also extracts the ghc handler into the handle file and adds tests

* Add testing for previous major release of ghc
2017-02-17 17:18:38 +00:00
Andrea Caforio
a7272466f7 Fix clang++ flag typo. 2017-02-16 18:12:41 +01:00
Rob Berry
c4afd72792 Add hdevtools linter for haskell
This adds support for the hdevtools haskell linter
https://github.com/hdevtools/hdevtools

The output for hdevtools is near identical to the ghc output so this
also extracts the ghc handler into the handle file and adds tests
2017-02-16 10:06:48 +00:00
Adriaan Zonnenberg
b2241e991b Support columns on php handler
Also added some tests for different error messages
2017-02-15 23:59:18 +01:00
Alex Masterov
903a6dc885 Fix 'yamllint' syntax 2017-02-16 00:58:48 +03:00
w0rp
c49819e892 Merge pull request #345 from AlexMasterov/feature/yaml-yamllint-options
Add yamllint option to pass in more options
2017-02-15 21:45:19 +00:00
Alex Masterov
7ef1d485fe Add yamllint option to pass in more options 2017-02-15 11:36:16 +03:00
Daan van Vugt
68b6be57f1 Update line marker pattern for new gfortran
Add tests for GCC 4.1.2, 4.9.2 and 6.3.1
2017-02-14 14:31:31 +01:00
Alex Masterov
4e082b9217 Add stylelint option to pass in more options 2017-02-12 09:25:40 +03:00
w0rp
ed269b8831 Fix the clangtidy linter, and document everything 2017-02-11 23:45:06 +00:00
Tim van Deurzen
355608b031 Add clang-tidy linter for cpp. (#275)
* Add clang-tidy linter for cpp.

* Use stdin-wrapper to allow linting as you type.
2017-02-11 23:32:56 +00:00
w0rp
341ea5f367 Fix the custom check issue. 2017-02-11 22:06:20 +00:00
w0rp
112f71fb17 Make javac work in a basic way 2017-02-11 22:02:38 +00:00
Valentin Finini
8c4846b68a Added support for javac (with eclipse classpath support for now) (#141)
* A try at javac support for ALE

* Small cleanup: moved '/tmp/java_ale' string into script var

* Fixed Travis-CI build failing on autocmd not being in augroup and stupid omission

* One more fix for Travis-CI

* For some reason, expandtab was not set

* Indentation and removal of header guard.

Used examples from ale_linters/c/gcc.vim and
ale_linters/javascript/eslint.vim for the indentation of string concat blocks.
2017-02-11 21:29:48 +00:00
w0rp
ecbb276805 Replace every stdin-wrapper script with the new %t formatting support 2017-02-11 19:40:57 +00:00
w0rp
8ad85858b8 Merge pull request #329 from tomotanakamura/AddClangToCpp
Add clang to cpp linters.
2017-02-11 13:10:18 +00:00
tomotanakamura
2ba2aff65e Add clang to cpp linters. 2017-02-11 21:35:34 +09:00
w0rp
49f7ce4f6d Fix #246 Don't run flow if there's no .flowconfig 2017-02-10 22:47:56 +00:00
Jon Parise
d3e7d3d5e7 Pass the buffer's filename to Credo
By default, Credo attributes input from STDIN as though it came from a
file named `stdin`. This change passes the buffer's filename, too, so
that Credo can use that information when applying its configuration.

This is a nice improvement because files like `mix.exs` are normally
excluded from Credo-based linting. Previously, ALE would show lint
warnings for those files as they were edited. Now, they are correctly
honor the Credo configuration and don't produce lint output.
2017-02-09 19:24:28 -08:00
w0rp
b0190fd080 Merge pull request #306 from ahmedelgabri/standardjs
Add standard linter
2017-02-09 18:56:40 +00:00
Daniel Lupu
d8efd4fa73 add xo support (#304)
* add xo support

* add documentation

* Fix a screw up when fixing conflicts

* Fix it harder
2017-02-09 18:54:49 +00:00
w0rp
943fe9b4b0 Merge pull request #295 from metakirby5/pr/coffeelint-local
Add support for locally installed coffee and coffeelint
2017-02-09 18:44:52 +00:00
w0rp
f67cf17070 Merge pull request #285 from medains/master
Linter addition of PHP Mess Detector
2017-02-09 18:43:26 +00:00
w0rp
c3ebe7bd9e Cover the Rust handler with some tests 2017-02-07 21:17:10 +00:00
Joshua Rubin
472631573e try fixing go build (#297)
* try fixing go build

* cache some system calls

* fix /dev/null

* use chained commands, use `go test -c` instead of `go tool compile`

* fix some unescaped shell commands

* fix a bug with explicitly setting GOPATH

* implement changes requested in code review. handle errors from multiple files. fix issue when starting a new package

* run `go env` as a job

* ensure all functions return the proper type

* fix loclist line numbers in some cases

* remove multibuffer support for now
2017-02-07 20:36:04 +00:00
w0rp
c0ac393297 #256 Attempt to fix Rust linter issues again 2017-02-07 15:19:37 +00:00
w0rp
da8408501c #256 Attempt to fix Rust linter issues 2017-02-07 15:15:22 +00:00
w0rp
a3b7056cad #289 Only use the --stdin-display-name flag if the flake8 version supports it 2017-02-06 11:12:27 +00:00
w0rp
a9a76241ac Merge pull request #307 from yous/rubocop-comment
Update comments for RuboCop pattern
2017-02-06 09:59:20 +00:00
w0rp
ccf78c40b1 Merge pull request #305 from notkild/master
Fix rust linting with cargo when multiple targets are present
2017-02-06 09:34:27 +00:00
notkild
0143eb6a53 Fix rust linting with cargo when multiple targets are present 2017-02-06 09:21:06 +01:00
Chayoung You
6f40cdca65
Update comments for RuboCop pattern 2017-02-06 15:13:13 +09:00
w0rp
9d85590421 Take the rubocop filename from the buffer number given to the function 2017-02-05 22:32:38 +00:00
w0rp
0a14bbe78d Merge pull request #299 from derekprior/dp-fix-rubocop-again
Fix Rubocop filename handling
2017-02-05 22:31:43 +00:00
Ahmed El Gabri
119695bd08
Add standard linter 2017-02-05 21:19:34 +01:00
w0rp
744d7d789f Merge pull request #294 from tpict/master
Add vint support for Neovim commands
2017-02-05 15:58:15 +00:00
w0rp
d953c68ebb Fix mypy error parsing when column numbers are included. 2017-02-04 19:47:37 +00:00
w0rp
829f87bc6a Fix #124 Finish implementing command chaining, and make it work for DMD 2017-02-04 18:30:30 +00:00
Derek Prior
f2fc7072b9
Fix Rubocop filename handling
In my previous change, I updated the Rubocop linter to pass the filename
to Rubocop. This change was tested on a file I expected Rubocop to
ignore and the experience in vim was as I expected. However, I soon
found that ALE wasn't finding errors in files that should not be
ignored. After investigation, I found a few issues that this commit
fixes:

1. We were not properly passing the current filename. We now use
   `expand` to get the filename.
2. The regular expression used in the callback was expecting the static
   value of `_` for the filename in output. We now use a looser regular
   expression that begins matching on the first `:`.
3. The linter was defined statically. By using the current filename when
   defining the command the linter would always use the filename of the
   first Ruby file the user opened. We now use a `command_callback` to
   inject the proper filename.

I tested these changes on a configuration with included and excluded
files and found it to work as I expected. Apologies for the earlier
incorrect change.
2017-02-03 16:03:52 -05:00
Ethan Chan
69ce8502a4 add support for locally installed coffee 2017-02-02 17:03:26 -08:00
Ethan Chan
1da187a6e5 add support for locally installed coffeelint 2017-02-02 16:56:09 -08:00
tpict
32c8d02d62 Add --enable-neovim flag to vint when appropriate 2017-02-02 19:48:18 +00:00
medains
ff096124c6 Linter addition of PHP Mess Detector 2017-02-01 16:28:51 +00:00
EinfachToll
e8123b3d5e Tell gcc to use C, not C++, when linting C source files
A regression bug introduced with PR #232
Ref #278
2017-02-01 11:22:21 +01:00
Łukasz Jan Niemier
a1458e9c07 Dockerfile linting via hadolint (#282)
* Add hadolint linter for Dockerfiles

* Fix path

* Fix typo

* Update docs
2017-01-30 15:27:26 +00:00
Derek Prior
a82ead0dc1
Enable Rubocop to exclude files based on config
When using `--stdin`, Rubocop requires that you also pass the associated
file name. ALE was previously passing `_` as the filename. By passing
the actual relative path to the file and enabling the
`--force-exclusion` option, we can get Rubocop to respect excluded files
in the configuration.

Closes #197
2017-01-27 16:29:58 -05:00
w0rp
d7ed49f849 Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues. 2017-01-22 14:54:57 +00:00
w0rp
e4a4fcd26b Make the Erlang linter code match the style used in the rest of the codebase. Make the options match the new standard. 2017-01-22 13:51:57 +00:00
Magnus
cae153b3ac Add erlc lint for Erlang (#248) (#255)
* Add erlc lint for Erlang (#248)

* Ignore certain errors in Erlang .hrl files (#248)

A .hrl file does not need to have a -module definition. Additionally, it
is common to have unused elements in such a file, as the entities will
be used in a file including the header.

* Address change requests to Erlang linter
2017-01-22 13:42:18 +00:00
w0rp
9820899b9e Improve mypy handling a little bit more 2017-01-20 17:30:34 +00:00
w0rp
ea438be5c1 REVERT "Fix some naming conventions and use abort for all Rust functions, and disable the rust linters for now, re #256"
This reverts commit f412b4f96f.

Conflicts:
	doc/ale.txt
2017-01-19 20:21:54 +00:00
w0rp
2478d7d925 Merge pull request #262 from KenjiTakahashi/fix_swiftlint
Fix SwiftLint
2017-01-19 13:23:46 +00:00
Aswin
d45505e135 Fix using variable g:ale_python_mypy_options that was not defined 2017-01-18 16:01:36 +05:30
KenjiTakahashi
62b492c727 Fix SwiftLint
1. Should be defined for 'swift' files, not 'swiftlint'.
2. Use `--use-stdin` option instead of the stdin-wrapper.
2017-01-17 19:59:45 +01:00
w0rp
41686980fd Document the mypy options, and fix spacing issues, largely in the documentation 2017-01-15 13:20:23 +00:00
w0rp
35bdd6f478 Merge pull request #237 from keith/ks/mypy-linter
Add python mypy support
2017-01-15 13:05:37 +00:00
w0rp
f1ac7c9f73 Rename pylint _args variables to _options variables 2017-01-15 13:05:07 +00:00
w0rp
548ff299f4 Merge pull request #243 from SabatierBoris/master
Add options for pylint linter
2017-01-15 13:02:51 +00:00
Junfeng Li
8762a6fa66 Support C# linting with mono compiler mcs. (#250)
* Support netcore project linting.

* Support check on the fly.

* Remove debug.

* Rename csc.vim to mcs.vim as it should be.

* Update README.

* Update doc.

* Using `=~#` instead of `=~`.
2017-01-15 12:42:17 +00:00
Masahiro H
74e7a283c0 Improve Verilator support (#205) (#258)
* improve-verilator-support

* fix for linter
2017-01-15 12:39:13 +00:00
SABATIER Boris
0a9f9c0811 Add executable and arguments options for pylint linter 2017-01-13 10:59:39 +01:00
w0rp
f412b4f96f Fix some naming conventions and use abort for all Rust functions, and disable the rust linters for now, re #256 2017-01-13 09:23:03 +00:00
w0rp
3b486d3475 Prefix mandatory flake8 arguments with extra spaces so they will always work 2017-01-12 13:11:10 +00:00
w0rp
9191750b5b Fix #175 - Fix the error types for rubocop 2017-01-12 12:57:07 +00:00
EinfachToll
9c5f092b4f Add support for Rust using rustc and cargo (#230)
* Add rustc checker for rust files

* Add documentation for rustc

* Use a nice helper function

* Add cargo as linter

* Complete the doc for rust linters

* Put l: in front of every local variable

* Apply the requested stylistic changes
2017-01-12 09:33:55 +00:00
w0rp
75485d53f6 Merge pull request #245 from zefei/add-eslint-options
Add eslint option to pass in more options
2017-01-12 09:28:06 +00:00
Zefei Xuan
2c176a234e added eslint option to pass in more options 2017-01-05 00:28:32 -08:00
Zefei Xuan
5a0c3fd01e Added hack linter for php (#239)
* added hack linter

* updated docs for hack (hh_client)

* naming
2017-01-04 17:07:21 +00:00
w0rp
ed43b17201 Merge pull request #244 from icgood/fix-perlcritic-typo-exception
Fix typo in perlcritic linter dictionary
2017-01-04 13:10:35 +00:00
w0rp
c9b58136bf Merge pull request #236 from Chronial/patch-1
Pass file name to flake8
2017-01-04 12:57:40 +00:00
Ian Good
c97ad01bcb Fix typo in perlcritic linter dictionary
The linter validation logic was checking for `stdout`, `stderr`, or
`both`, resulting in an exception being thrown when loading the
perlcritic linter.
2017-01-03 14:55:23 -05:00
Keith Smiley
4566bd65c9
Add python mypy support
This adds support for the official optional python typechecker.
2016-12-30 16:12:30 -08:00
Chronial
e0928d0991 Pass file name to flake8 2016-12-30 17:06:49 +01:00
still-dreaming-1
2b251a2cee Fix PHP lint generic error without line number
This makes php output more specific error messages. The format is the normal one ALE expects, but on some systems ALE does not work with PHP unless the display_errors=1 option is used. Without that option php will only output a generic message without a line number like "Errors parsing index.php"
2016-12-28 11:10:47 -07: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