mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 07:58:18 +00:00
Fix: Actually call ValidateOptions (#8665)
* fix: actually call ValidateOptions * convert error to warning in validateoptions
This commit is contained in:
@@ -758,6 +758,8 @@ FlatCOptions FlatCompiler::ParseFromCommandLineArguments(int argc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ValidateOptions(options);
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -766,9 +768,8 @@ void FlatCompiler::ValidateOptions(const FlatCOptions &options) {
|
|||||||
|
|
||||||
if (!options.filenames.size()) Error("missing input files", false, true);
|
if (!options.filenames.size()) Error("missing input files", false, true);
|
||||||
|
|
||||||
if (opts.proto_mode) {
|
if (opts.proto_mode && options.any_generator) {
|
||||||
if (options.any_generator)
|
Warn("cannot generate code directly from .proto files", true);
|
||||||
Error("cannot generate code directly from .proto files", true);
|
|
||||||
} else if (!options.any_generator && options.conform_to_schema.empty() &&
|
} else if (!options.any_generator && options.conform_to_schema.empty() &&
|
||||||
options.annotate_schema.empty()) {
|
options.annotate_schema.empty()) {
|
||||||
Error("no options: specify at least one generator.", true);
|
Error("no options: specify at least one generator.", true);
|
||||||
|
|||||||
Reference in New Issue
Block a user