Commit graph

186 commits

Author SHA1 Message Date
harttle
4b6691f602 test: unit test for fecs fixer, fecs command 2019-04-11 19:47:31 +08:00
w0rp
e85eb82401
#2132 - Implement feature tests with ale#Has 2019-04-07 15:34:39 +01:00
w0rp
3bebcb5d48
#2132 - Replace command_chain and chain_with with ale#command#Run 2019-04-07 14:58:06 +01:00
w0rp
89e5491862
Revert "#2132 Change (buffer, lines) fixer functions to (buffer, done, lines)"
This reverts commit f1ed654ca5.
2019-02-22 20:48:06 +00:00
Aiden Scandella
de29ff26ff
Respect python black fixer configuration file
Similar to other linters/fixers, by default change to the directory of
the file being fixed before invoking `black`, which allows the tool to
read project-specific configuration (pyproject.toml)

Fixes #2218
2019-01-30 14:44:38 -08:00
w0rp
08d3523962
Merge pull request #2228 from Nomad145/ktlint
Add ktlint Fixer Support
2019-01-27 15:55:13 +00:00
Attila Maczak
d7ced31fe2 add cmake-format fixer support (#2244) 2019-01-27 11:45:57 +00:00
Alvin Chan
f12d312aa4 Add babylon as default Prettier parser (#2220)
* Mimic Prettier's default parser by setting it to `babylon`
* Add tests to check default Prettier `parser`
* Set Prettier default parser based on version
* Update the comment to explain the reason for an explicit default
2019-01-22 10:24:15 +00:00
Michael Phillips
bd1e639681 Add ktlint fixer support. 2019-01-20 19:39:47 -06:00
TANIGUCHI Masaya
fabebb3a47 Add textlint for Asciidoc and add it to Fixers (#2193)
* Add textlint for asciidoc
* Add textlint --fix
2019-01-10 18:53:45 +00:00
Miklós Tusz
48057407ec Fixup tests for auto-pipenv 2018-12-21 20:28:17 -08:00
Miklós Tusz
4bf260e953 Remove unnecessary exe check for black 2018-12-21 20:07:14 -08:00
Miklós Tusz
63e76875d5 Add test for python_black_auto_pipenv 2018-12-21 20:07:14 -08:00
w0rp
f1ed654ca5
#2132 Change (buffer, lines) fixer functions to (buffer, done, lines) 2018-12-18 11:13:28 +00:00
w0rp
9a3be907ea
Close #2152 - Use ale_javascript_standard_options for fixing files too 2018-12-18 09:28:55 +00:00
Justin Searls
2cfa09e02d Adds standardrb linter (#2133)
See: https://github.com/testdouble/standard

StandardRB is to RuboCop what StandardJS is to ESLint. This commit 
naively copies the RuboCop linter and fixer to point at the standardrb
executable. Any other adjustments are very minor (the only I can think 
of is that standardrb takes a `--fix` option instead of 
`--auto-correct`).

This raises a confusing point to me as both developer and a user: since
ale enables all linters by default, won't this run both RuboCop and 
StandardRB (the results of which will almost always be in conflict with
one another)? How does ale already solve for this for the similar case
of StandardJS and ESLint?
2018-12-10 14:02:32 -07:00
Horacio Sanson
9e97a6914e Add bibclen fixer support
Closes #1910
2018-12-01 15:05:18 +09:00
Abin Simon
1f4dbb82ec add tests for prettier-html 2018-11-12 12:28:34 +05:30
Andrey Popp
b9fb62a4cd Make ocamlformat work without temporary files
Problem: ocamlformat is configured to format files in-place and thus go
via creating a temporary file for that. Because temporary file resides
in a different directory ocamlformat can't find `.ocamlformat`
configuration files in an original location of source files.

Solution: ocamlformat since version 0.8 can read sources on stdin and
spur result on stdout. We reconfigure ocamlformat to use a simpler
interface.
2018-11-04 20:32:56 +03:00
Max Hung
be02ba4ed7 Use correct exclusion flag in rubocop fixer 2018-10-31 11:18:07 +13:00
Justin Powell
90048ac933 fix missing (s) on rubocop exclusion flag 2018-10-26 11:47:28 -05:00
Justin Powell
b7e0321890 closes #1580 add force exclusion to rubocop fixer 2018-10-26 10:40:02 -05:00
w0rp
3e65e85178
Merge pull request #2016 from terryding77/master
fix: change google_java_format_* to java_google_java_format_*
2018-10-25 15:34:31 +01:00
w0rp
b3829d043d
Merge pull request #2012 from paihu/fix-cdstring-win32-change-drive
Fix #2011 MS Windows, lint error when current drive and target file drive is different.
2018-10-25 14:24:56 +01:00
Terry Ding
3ba9cad878 fix: change google_java_format_* to java_google_java_format_* for inject global variables according to doc/ale-java.txt 2018-10-24 20:10:31 +08:00
Derek P Sifford
e94a594e2e add terraform fmt fixer for terraform and hcl filetypes
See #1718
2018-10-23 20:44:31 -04:00
paihu
f4395f5b8c ale#path#CdString include ale#Escape 2018-10-23 23:20:27 +09:00
paihu
2ea83939a5 fix testcase 2018-10-22 22:59:06 +09:00
Aliou Diallo
b7ec11c93d Allow custom filters for the jq fixer (#1980)
* Allow the jq filters to receive custom filters.
* Update documentation.
2018-10-12 09:15:32 +01:00
Evan Borden
a8915d885b Add better support for Haskell stack compiler tools (#1851)
* Add better support for Haskell stack compiler tools

This commit adds support for `stack` as the executable of a tool. This
follows a pattern that has been implemented for `bundler`'s tool chain.

* Move hlint command to linter file
* Add vader test for stack exec handling
* Update ghc-mod to support stack execution

`ghc-mod` was previously broken into 2 linters.

1. ghc_mod
2. stack_ghc_mod

This additional linter is not necessary with proper support for
executable variables and `stack exec` handling.

* Support stack exec in hfmt
* Support stack in hdevtools
2018-09-28 09:05:01 +01:00
Bert JW Regeer
8e7e810db6 Bugfix: python add blank lines (#1944)
* Don't add newlines when not a control statement for Python
* Add test for accidental newline fix
* Add docstring detection to avoid adding unnecessarily newlines
* Add tests for docstring detection
2018-09-25 10:02:01 +01:00
w0rp
aa5c82b171
Merge pull request #1932 from rhysd/shfmt-default-indent
shfmt: Use Vim's indent config as default indent width
2018-09-20 09:30:59 +01:00
Martin Tournoij
e82bcdb8a6 Add fixer for Go modules (#1873)
* Add fixer for Go modules
2018-09-19 19:33:23 +01:00
rhysd
532686102e shfmt: Use Vim's indent config as default indent width 2018-09-18 17:51:00 +09:00
w0rp
ddb3e6d57a
Handle failing to connect to eslint_d 2018-09-17 17:32:57 +01:00
w0rp
0948dcc435
Merge pull request #1897 from LEI/add-sqlfmt-fixer
Add support for sqlfmt
2018-09-09 11:55:42 +01:00
LEI
a97ef49c51
Add support for sqlfmt 2018-09-08 01:34:10 +02:00
Derek P Sifford
0ed4a5bbcc add uncrustify fixer for several languages 2018-09-04 20:39:32 -04:00
w0rp
ee3142b601
Merge pull request #1866 from Steap/feature/xmllint-fixer
Add support for xmllint as a fixer.
2018-08-28 23:36:00 +01:00
Cyril Roelandt
cc5ad6491f Add support for xmllint as a fixer. 2018-08-28 23:43:52 +02:00
sbl
b7169c33e7 fix tests 2018-08-26 13:59:55 +02:00
sbl
aa015ec4db add ocamlformat support 2018-08-26 13:47:56 +02:00
w0rp
1f26fc4013
Merge pull request #1841 from dabbeg/fix-importjs-fixer
importjs fixer not reading correct executable variable name
2018-08-24 10:31:18 +01:00
Davíð Guðni
f526fc68d1 importjs fixer not reading correct executable variable name 2018-08-24 09:04:17 +00:00
Evan Borden
707b539969 Add hlint refactoring as a fixer (#1836) 2018-08-23 23:23:54 +01:00
Evan Borden
2600524274 Add stylish-haskell as a fixer (#1837)
* Add stylish-haskell as a fixer

`stylish-haskell` is a common formatting tool for the haskell toolchain.
It is not as advanced as `brittany` or `hindent`, but it is commonly
used for formatting of imports and data declarations. This adds it as a
fixer in ALE.
2018-08-23 23:14:59 +01:00
Brandon Bayer
63c66dc5d2 fix: Don't use error output from prettier_d for fixing files 2018-08-09 12:56:53 -04:00
w0rp
9ef266d050
Merge pull request #1770 from fredemmott/hack
Split Hack out from PHP, modernize
2018-08-02 21:58:57 +01:00
Paul Reimer
cb8ad9fbd8 Javascript prettier filetype detect fix (#1769)
Support fixing YAML and HTML files with prettier for files without file extensions.
2018-08-02 20:20:19 +01:00
Fred Emmott
238201805d
Split Hack out from PHP, modernize
fixes #1738

- Replace previous `hh_client` usage with LSP client
- Add `HHAST` linter
- Split Hack from PHP: Hack is increasingly diverging from PHP:
  - Hack tools do not understand PHP
  - Most PHP tools do not handle Hack code well (including vim's syntax
    highightling files)
  - http://github.com/hhvm/vim-hack now sets filetype to `hack`
2018-08-02 11:28:56 -07:00
w0rp
a42999a639
Massively reduce the amount of code needed for linter tests 2018-07-15 18:28:28 +01:00
Derek P Sifford
6dc69b2144 address code review issues 2018-07-04 21:16:57 -04:00
Govind KP
9d98e6db0c Added dartfmt fixer (#1683)
* Added dartfmt to Fixers
* Added dartfmt specific documentation
2018-07-01 13:55:41 +01:00
Abin Simon
17c1aefb5b Add fixer tidy for HTML
Add tests for tidy HTML fixer
2018-06-23 22:59:13 +05:30
Alvin Chan
b8a1038a41 Set --parser option in Prettier's fixer (#1620)
* Set `--parser` option in Prettier's fixer
* Add expected `--parser` option to tests
* Disable Prettier `--parser` detection if file extension exists
* Manually default Prettier `--parser` to "babylon"
* Add `--parser` test for TypeScript
* Add tests for Prettier `--parser`
* Add JSON5 to the suggested fixer for Prettier
2018-06-18 22:40:57 +01:00
P M
f1b72218c3 Add support for qmlfmt fixer (#1651)
* Add support for qmlfmt fixer
2018-06-12 19:38:16 +01:00
Jeffrey Lau
77d0ac58ed Add 'scalafmt' fixer for Scala files
closes https://github.com/w0rp/ale/issues/1299
2018-06-03 04:40:52 +08:00
Kenta, Kobayashi
498be478be add perltidy fixer 2018-04-21 22:09:38 +09:00
aspidiets
f9ae58849a
Fix #1424 - Make the brittany fixer work 2018-04-08 17:38:43 +01:00
Adriaan Zonnenberg
121e806423 Add g:ale_php_cs_fixer_options variable (#1477)
* Add g:ale_php_cs_fixer_options variable

* Fix test
2018-04-07 23:53:03 +02:00
Jack Evans
c5d3af04fc Added support for Python black fixer (#1451) 2018-04-06 11:08:25 +02:00
w0rp
434f22e44a
Merge pull request #1415 from fohte/fixer-rufo
Add rufo fixer for Ruby files
2018-03-18 17:42:07 +00:00
w0rp
440502dc93
Clean up the mix format command and tests 2018-03-18 17:40:34 +00:00
w0rp
92612a9eab
Merge pull request #1410 from fribmendes/frm/mix_format_options
Allow passing options to mix_format
2018-03-18 17:36:33 +00:00
Hayato Kawai
7e1a9a9810
Add rufo fixer for ruby files 2018-03-11 13:33:57 +09:00
Fernando Mendes
6320ce6674 Allow passing options to mix_format 2018-03-08 15:29:10 +00:00
Gordon Fontenot
9258c73680
Fix elm-format fixer name
Support for elm-format as a fixer has existed since Sept 2017, but it's not
easy to discover because the fixer was named `format`. This breaks the
convention of the other fixers that use the full name in the registry.

I've gone ahead and fixed this discrepancy, but I left the existing registry
entry in place. We should move people towards using `elm-format` as the fixer
name, but I'd hate to break existing setups.
2018-03-08 09:19:12 -06:00
Julien Deniau
fbbb8c17d9 add php-cs-fixer to list of fixers 2018-03-01 15:48:47 +01:00
w0rp
0f822b063c Fix #1330 - Find isort configs better by changing the working directory 2018-02-04 13:16:44 +00:00
w0rp
7ef55a8615 #1303 jq isn't a Node program 2018-01-28 11:51:20 +00:00
rhysd
b28a6ddbe4 Support fixing JSON files with fixjson 2018-01-24 10:36:31 +00:00
Björn Lindström
b0eaddadc9 Don't use temporary file for rustfmt fixer
rustfmt normally acts on a file in place, and applies configuration
from rustfmt.toml files according to the path of the file.

Using a temporary file for rustfmt breaks this functionality, so
removing the '%t' from the rustfmt command.
2017-12-27 23:12:57 +07:00
w0rp
1568bf8128 Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
butlerx
0700c2d900
add google-java-format fixer 2017-12-09 14:25:35 +00:00
Martin Tournoij
92f20b0e51
goimports fixer doesn't work for vendored libraries
In Go you can "vendor" packages by putting them in the `vendor/`
directory for a project. Adding the `-srcdir` argument makes `goimports`
pick up these packages, in addition to what you have in GOPATH.

Without this, `goimports` is not very useful, since most projects vendor
their packages.
2017-12-08 12:49:02 +00:00
w0rp
7a71186d62
Merge pull request #1174 from eborden/eborden/add-brittany-for-haskell-formatting
Add brittany for Haskell formatting
2017-12-07 19:15:33 +00:00
Jeff Willette
fba3c57872 added importjs fixer
- added tests for fixer functions
- added docs
2017-12-05 00:37:31 +09:00
E.J. Sexton
122fdfd329 Fixed command string for phpcbf fixer 2017-12-02 09:27:18 +01:00
w0rp
6503b85d3d Fix #1178 - Don't use the output from eslint_d for fixing files when the output is an error message 2017-11-29 10:08:54 +00:00
Evan Rutledge Borden
edb3a0c5e4 Add brittany for Haskell formatting
`brittany` is one of the options for Haskell source formatting. This
adds the necessary fixer files and documentation to support `brittany`
in `ALE`.
2017-11-28 17:58:13 -05:00
w0rp
5160f814d9 Fix #988 - Support --fix-dry-run for ESLint by processing the JSON output 2017-11-22 23:23:14 +00:00
w0rp
fbfde6968a Fix a typo 2017-11-22 17:44:21 +00:00
w0rp
9857e0a4b7 Fix the eslint_d fixer tests for Windows 2017-11-22 17:25:37 +00:00
w0rp
6e65998ca7 #988 Take --fix-dry-run away again, because it is dumb 2017-11-22 17:01:50 +00:00
w0rp
b5ec1a5fd0 Fix #988 - Support --fix-dry-run for ESLint where available, and --fix-to-stdout for eslint_d 2017-11-22 16:51:04 +00:00
w0rp
4b4762697c #1095 Use --stdin-filepath where available for prettier-eslint 2017-11-22 14:46:14 +00:00
w0rp
520541cd2d #1095 - Use --stdin-filepath for prettier, where available 2017-11-22 13:46:11 +00:00
w0rp
48eb362fca Add tests for the goimports fixer commands 2017-11-14 17:46:40 +00:00
Jeff Willette
20a01404f3 Added support for goimports fixer (#1123)
* Added support for goimports fixer
* added test and executable check
* fixed test assertions to reflect executable check
2017-11-14 17:37:22 +00:00
w0rp
3c8e6ed51c Modify the shmft tests so they won't mess with your settings 2017-11-05 21:31:41 +00:00
Simon Bugert
716b22d524 Add shfmt fixer for sh files (#1083)
* Add shfmt fixer for sh files
* Add tests for shfmt fixer
2017-11-05 21:24:41 +00:00
Ahmed El Gabri
634eb1920c
refmt fixer for ReasonML 2017-10-29 21:48:28 +01:00
Sam Howie
36898436b5 Add hackfmt fixer 2017-10-27 13:42:55 -07:00
Zack Kourouma
07dad64acb adds fixer support for hfmt (#1027)
Add support for fixing Haskell with hfmt
2017-10-24 22:29:04 +01:00
w0rp
c248885e57 Merge pull request #1025 from kfox/add-rustfmt-fixer
add rustfmt fixer
2017-10-24 22:20:03 +01:00
Carlos Ramos
3212278c91 fix test's and delete unused code 2017-10-22 19:20:38 -04:00
Carlos Ramos
43653ef548 new fixer elixir mix format
(only available in elixir > 1.6)
2017-10-22 19:20:38 -04:00
Kelly Fox
35031a0b8a add rustfmt fixer 2017-10-21 12:31:49 -05:00
Zack Kourouma
e023e7a2fe add prettier fixer support for 'less' filetype 2017-10-20 18:29:57 -07:00
Carlos Ramos
8a8879a28f fix test't 2017-10-16 12:08:10 -04:00