mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-01 17:57:25 +00:00
Fix: Actually call ValidateOptions (#8665)
* fix: actually call ValidateOptions * convert error to warning in validateoptions
This commit is contained in:
parent
957e09d684
commit
5218e29aa4
1 changed files with 4 additions and 3 deletions
|
|
@ -758,6 +758,8 @@ FlatCOptions FlatCompiler::ParseFromCommandLineArguments(int argc,
|
|||
}
|
||||
}
|
||||
|
||||
ValidateOptions(options);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
@ -766,9 +768,8 @@ void FlatCompiler::ValidateOptions(const FlatCOptions &options) {
|
|||
|
||||
if (!options.filenames.size()) Error("missing input files", false, true);
|
||||
|
||||
if (opts.proto_mode) {
|
||||
if (options.any_generator)
|
||||
Error("cannot generate code directly from .proto files", true);
|
||||
if (opts.proto_mode && options.any_generator) {
|
||||
Warn("cannot generate code directly from .proto files", true);
|
||||
} else if (!options.any_generator && options.conform_to_schema.empty() &&
|
||||
options.annotate_schema.empty()) {
|
||||
Error("no options: specify at least one generator.", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue