summaryrefslogtreecommitdiff
path: root/autoload/ale/fix/registry.vim
diff options
context:
space:
mode:
authorJon Parise <jon@indelible.org>2021-02-21 04:35:26 -0800
committerGitHub <noreply@github.com>2021-02-21 21:35:26 +0900
commit90b9597d500c528d46aa13ccfa678a86ef7ea22b (patch)
tree2f94224a548ac63f66860eddc7fa4f6f099923aa /autoload/ale/fix/registry.vim
parent2550f5d952caea4ac607ec0796d8f1fae4d7b9a5 (diff)
downloadale-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.vim5
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'],