This repository has been archived by the owner on Mar 4, 2022. It is now read-only.
v1.4.0
- Add concept of lint groups. The default lint group is named
uber1
. The lint
group can be specified with thelint.group
option. - New
uber2
lint group and associated V2 Style Guide representing the second
version of our lint rules. These rules are almost entirely a superset of the
V1 Style guide lint rules. Iflint.group
is set touber2
, this also will
affect thecreate
andformat
commands, as theuber2
lint group adds
more file options to more closely match the Google Cloud APIs File Structure
and changes the value ofgo_package
to take versions into account.
In total, 39 lint rules have been added as compared to theuber1
lint
group. - New
google
lint group representing Google's minimal Style Guide. - Add
--list-lint-group
flag to thelint
command to list a lint group's
rules. - Add
--diff-lint-groups
flag to thelint
command to print the diff
between two lint groups. - Add
descriptor-set
command to output a mergedFileDescriptorSet
with all files compiled to either stdout, a given file, or a temporary file.
Useful with external tools that use FileDescriptorSets, and also useful for
inspection if the--json
flag is given. - Add breaking change detector as the
break check
command. By default, this
compiles your existing Protobuf definitions, and then does a shallow clone
of your git repository against the default branch and compiles the
definitions on that branch, and compares the existing versus the branch.
The branch can be controlled with the--git-branch
flag, and one can
use aFileDescriptorSet
instead of a shallow clone by generating a
file withbreak descriptor-set
and then passing the path to this file
tobreak check
with the--descriptor-set-path
flag. - A Docker image is now provided on Docker Hub as uber/prototool
which provides an environment with commonly-used plugins. - Switch to Golang Modules for dependency management.
- Add Bazel build files and
bazel/deps.bzl
to allow Prototool to be easily
built within a Bazel workspace. - Add
lint.file_header
option to allow a file header to be specified. This
affectslint
,format
, andcreate
. - Allow
generate.plugins.path
to be relative. If a relative path is given,
Prototool will search yourPATH
for the specified executable. - Add
generate.plugins.file_suffix
option that allows for JAR generation with
the built-injava
plugin, andFileDescriptorSet
generation with the
built-indescriptor_set
plugin. - Add
generate.plugins.include_imports
and
generate.plugins.include_source_info
to be used with the built-in
descriptor_set
plugin. - Add
cache
top-level command to allow management of theprotoc
cache. - Add
x
top-level command for experimental functionality. - Add
inspect
command underx
with Protobuf inspection capabilities. - Add
--error-format
flag to allow specific error fields to be printed. - Allow the
protoc
binary and WKT paths to be controlled by the environment
variablesPROTOTOOL_PROTOC_BIN_PATH
andPROTOTOOL_PROTOC_WKT_PATH
in
addition to the existing--protoc-bin-path
and--protoc-wkt-path
flags.
The flags take precedence. This is especially useful for Docker images. - Add file locking around the
protoc
downloader to eliminate concurrency
issues where multipleprototool
invocations may be accessing the cache
at the same time. - Add TLS support to the
grpc
command. - Add
--details
flag to thegrpc
command to output headers, trailers,
and statuses as well as the responses. - Unix domain sockets can now be specified for the
--address
flag of the
grpc
command via the prefixunix://
.