Commit graph

208 commits

Author SHA1 Message Date
David Wood
6aeb462171
Add nixpkgs-fmt fixer.
This commit adds a fixer for the Nix language, nixpkgs-fmt
(https://github.com/nix-community/nixpkgs-fmt).
2019-08-26 19:21:07 +01:00
w0rp
73812c3e41
Merge remote-tracking branch 'AlexeiDrake/master' into bugfix/c-lsp-build-dir-settings 2019-08-18 18:29:59 +01:00
richyfish
c4bdf165ca Black fixer should include --pyi for files with .pyi extension (#2705)
* black fixer should include --pyi for files with .pyi extension
2019-08-18 15:45:15 +01:00
w0rp
ddb559b3be
Merge pull request #2631 from timlag1305/feat/ada-gnatpp
Add gnatpp fixer for Ada
2019-08-18 15:37:51 +01:00
Sorin Iclanzan
f89b49a014 Add purty fixer. 2019-08-12 11:49:19 -04:00
w0rp
dd1e1025b8
Fix #2668 - Set g:ale_go_go111module 2019-08-02 09:09:10 +01:00
w0rp
3ae01ba249
Merge pull request #2430 from eliath/master
Support $GO111MODULE with Go tooling
2019-07-30 21:17:20 +01:00
Paul Reimer
d25711a516
Set --assume-filename for clangformat fixer 2019-07-19 07:57:10 -07:00
Matthew Lanigan
abb38955d3 Add Sorbet ruby linter and fixer (#2614) 2019-07-13 17:37:48 +01:00
ObserverOfTime
8700586890 Add clangtidy fixer (#2548)
* Add clangtidy fixer
* Add extra_options to clangtidy fixer
* Also, use cpp variables in cpp filetypes
2019-07-02 08:11:10 +01:00
Tim Lagnese
221aceb6db Add gnatpp fixer for Ada 2019-07-01 20:50:02 -04:00
Elias Martinez Cohen
49db8210f6 Support $GO111MODULE with Go tooling
Allows the user to override $GO111MODULE environment variable through
ale options. This gives control over the default behavior of Go module
resolution.

Golang documentation:
https://github.com/golang/go/wiki/Modules#how-to-use-modules

Add `ale#Go#EnvString()` function to make it easy to add similar Go
environment variables in the future.

Use the new `EnvString` function in all available Go tools callbacks
& update tests

Also add test of linter command callback for `gofmt`
2019-07-01 11:04:33 -04:00
w0rp
6e28eec243
Merge pull request #2563 from dcyriller/fixer-prettier-glimmer
prettier: Support experimental languages (Handlebars)
2019-06-13 11:08:21 +01:00
Jake Kaufman
56641e0230 Add support for reorder-python-imports fixer
isort is great, but I've come to prefer reorder-python-imports. The tool
has a focus on smaller diffs than isort. reorder-python-imports is also
a little smarter than isort which is nice.
2019-06-08 19:22:50 -04:00
Cyrille David
3e4b8ea466 prettier: Support experimental languages
Such as handlebars
2019-06-06 22:04:32 +02:00
Sajjad Hashemian
8d8b295ef5 add pgformatter 2019-05-27 09:00:11 +04:30
w0rp
e6745a3811
Fix #1989 - Use ESlint options for fixers too 2019-05-17 20:45:25 +01:00
Kanenobu Mitsuru
c10da0e390 Add fixer for OCaml ocp-indent (#2436) 2019-05-07 18:50:26 +01:00
w0rp
5d65f93033
Merge pull request #2437 from robertjlooby/add-floskell
Add floskell for Haskell formatting
2019-05-01 22:43:44 +01:00
Thibault Vatter
ce0b14979e Add a fixer for r based on the styler package (#2401)
* Add styler as a new fixer for R files
* Add to the list of supported tools
* Add documentation
2019-04-23 19:44:26 +01:00
Rob Looby
99361b2ca9
Add floskell for Haskell formatting 2019-04-14 11:27:48 -05:00
Riley Martine
495bce32e9 Add support for latexindent (#2387) 2019-04-13 13:21:59 +01:00
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