diff options
author | Jon Parise <jon@indelible.org> | 2021-02-21 04:35:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 21:35:26 +0900 |
commit | 90b9597d500c528d46aa13ccfa678a86ef7ea22b (patch) | |
tree | 2f94224a548ac63f66860eddc7fa4f6f099923aa /autoload/ale/fix/registry.vim | |
parent | 2550f5d952caea4ac607ec0796d8f1fae4d7b9a5 (diff) | |
download | ale-90b9597d500c528d46aa13ccfa678a86ef7ea22b.zip |
Add a buildifier fixer for Bazel files (#3499)
This fixer enables buildifier's formatting and "lint fix" modes.
Additional options can be provided via `bazel_buildifier_options`.
It also implements some basic logic for guessing the file's type.
buildifier itself usually does this based on the filenames provided on
the command line, but because we're piping our buffer via stdin, we need
to do this manually.
Diffstat (limited to 'autoload/ale/fix/registry.vim')
-rw-r--r-- | autoload/ale/fix/registry.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale/fix/registry.vim b/autoload/ale/fix/registry.vim index 8279fdb4..bb26573b 100644 --- a/autoload/ale/fix/registry.vim +++ b/autoload/ale/fix/registry.vim @@ -32,6 +32,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['python'], \ 'description': 'Fix PEP8 issues with black.', \ }, +\ 'buildifier': { +\ 'function': 'ale#fixers#buildifier#Fix', +\ 'suggested_filetypes': ['bzl'], +\ 'description': 'Format BUILD and .bzl files with buildifier.', +\ }, \ 'deno': { \ 'function': 'ale#fixers#deno#Fix', \ 'suggested_filetypes': ['typescript'], |