2017-11-10 09:37:23 +00:00
|
|
|
===============================================================================
|
|
|
|
ALE Proto Integration *ale-proto-options*
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
Integration Information
|
|
|
|
|
|
|
|
To enable `.proto` file linting, update |g:ale_linters| as appropriate:
|
|
|
|
>
|
|
|
|
" Enable linter for .proto files
|
2022-04-06 08:00:59 +00:00
|
|
|
let g:ale_linters = {'proto': ['buf-lint', 'protoc-gen-lint', 'protolint']}
|
2022-11-25 13:16:16 +00:00
|
|
|
<
|
2021-04-09 13:16:23 +00:00
|
|
|
|
|
|
|
To enable `.proto` file fixing, update |g:ale_fixers| as appropriate:
|
|
|
|
>
|
|
|
|
" Enable linter for .proto files
|
2022-04-06 08:00:59 +00:00
|
|
|
let b:ale_fixers = {'proto': ['buf-format', 'protolint']}
|
2017-11-10 09:37:23 +00:00
|
|
|
<
|
2022-11-25 13:16:16 +00:00
|
|
|
|
|
|
|
|
2022-04-06 08:00:59 +00:00
|
|
|
===============================================================================
|
|
|
|
buf-format *ale-proto-buf-format*
|
|
|
|
|
|
|
|
The formatter uses `buf`, a fully-featured Protobuf compiler that doesn't depend
|
|
|
|
on `protoc`. Make sure the `buf` binary is available in the system path, or
|
|
|
|
set ale_proto_buf_format_executable.
|
|
|
|
|
|
|
|
g:ale_proto_buf_format_executable *g:ale_proto_buf_format_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
2022-10-29 11:56:47 +00:00
|
|
|
Default: `'buf'`
|
2022-04-06 08:00:59 +00:00
|
|
|
|
|
|
|
This variable can be changed to modify the executable used for buf.
|
|
|
|
|
2022-11-25 13:16:16 +00:00
|
|
|
|
2022-04-06 08:00:59 +00:00
|
|
|
===============================================================================
|
|
|
|
buf-lint *ale-proto-buf-lint*
|
|
|
|
|
|
|
|
The linter uses `buf`, a fully-featured Protobuf compiler that doesn't depend
|
|
|
|
on `protoc`. Make sure the `buf` binary is available in the system path, or
|
|
|
|
set ale_proto_buf_lint_executable.
|
|
|
|
|
|
|
|
g:ale_proto_buf_lint_executable *g:ale_proto_buf_lint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
2022-10-29 11:56:47 +00:00
|
|
|
Default: `'buf'`
|
2022-04-06 08:00:59 +00:00
|
|
|
|
|
|
|
This variable can be changed to modify the executable used for buf.
|
|
|
|
|
|
|
|
g:ale_proto_buf_lint_config *g:ale_proto_buf_lint_config*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
A path to a buf configuration file.
|
|
|
|
|
|
|
|
The path to the configuration file can be an absolute path or a relative
|
|
|
|
path. ALE will search for the relative path in parent directories.
|
|
|
|
|
2022-11-25 13:16:16 +00:00
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
clang-format *ale-proto-clangformat*
|
|
|
|
|
|
|
|
See |ale-c-clangformat| for information about the available options.
|
|
|
|
Note that the C options are also used for Proto.
|
|
|
|
|
|
|
|
|
2017-11-10 09:37:23 +00:00
|
|
|
===============================================================================
|
|
|
|
protoc-gen-lint *ale-proto-protoc-gen-lint*
|
|
|
|
|
|
|
|
The linter is a plugin for the `protoc` binary. As long as the binary resides
|
|
|
|
in the system path, `protoc` will find it.
|
|
|
|
|
2018-01-06 19:56:28 +00:00
|
|
|
g:ale_proto_protoc_gen_lint_options *g:ale_proto_protoc_gen_lint_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to protoc. Note that the
|
|
|
|
directory of the linted file is always passed as an include path with '-I'
|
|
|
|
before any user-supplied options.
|
|
|
|
|
2022-11-25 13:16:16 +00:00
|
|
|
|
2021-04-09 13:16:23 +00:00
|
|
|
===============================================================================
|
|
|
|
protolint *ale-proto-protolint*
|
|
|
|
|
|
|
|
The linter is a pluggable tool that doesn't depend on the `protoc` binary.
|
|
|
|
This supports both linting and fixing.
|
|
|
|
Make sure the binary is available in the system path, or set
|
|
|
|
ale_proto_protolint_executable.
|
|
|
|
Note that the binary with v0.22.0 or above is supported.
|
|
|
|
|
|
|
|
g:ale_proto_protolint_executable *g:ale_proto_protolint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
2022-10-29 11:56:47 +00:00
|
|
|
Default: `'protolint'`
|
2021-04-09 13:16:23 +00:00
|
|
|
|
|
|
|
This variable can be changed to modify the executable used for protolint.
|
|
|
|
|
|
|
|
g:ale_proto_protolint_config *g:ale_proto_protolint_config*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
A path to a protolint configuration file.
|
|
|
|
|
|
|
|
The path to the configuration file can be an absolute path or a relative
|
|
|
|
path. ALE will search for the relative path in parent directories.
|
|
|
|
|
2022-11-25 13:16:16 +00:00
|
|
|
|
2017-11-10 09:37:23 +00:00
|
|
|
===============================================================================
|
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|