Commit 40709548 authored by Volker Krause's avatar Volker Krause
Browse files

Don't validate results in out-of-process extraction

This is done in the post-processing stage locally anyway, so it's not
needed here, and it prevents us from controlling validation.
parent 888733c7
......@@ -124,6 +124,8 @@ int main(int argc, char** argv)
parser.addOption(pathsOpt);
QCommandLineOption formatOpt({QStringLiteral("o"), QStringLiteral("output")}, QStringLiteral("Output format [JsonLd, iCal]. Default: JsonLd"), QStringLiteral("format"));
parser.addOption(formatOpt);
QCommandLineOption noValidationOpt({QStringLiteral("no-validation")}, QStringLiteral("Disable result validation."));
parser.addOption(noValidationOpt);
parser.addPositionalArgument(QStringLiteral("input"), QStringLiteral("File to extract data from, omit for using stdin."));
parser.process(app);
......@@ -152,6 +154,7 @@ int main(int argc, char** argv)
contextDt = QDateTime::currentDateTime();
}
postproc.setContextDate(contextDt);
postproc.setValidationEnabled(!parser.isSet(noValidationOpt));
const auto files = parser.positionalArguments().isEmpty() ? QStringList(QString()) : parser.positionalArguments();
for (const auto arg : files) {
......
......@@ -165,7 +165,8 @@ void ExtractorEnginePrivate::extractExternal()
QStringList args({QLatin1String("--type"), ExtractorInput::typeToString(m_inputType),
QLatin1String("--context-date"), m_context->m_senderDate.toString(Qt::ISODate),
QLatin1String("--extractors"), extNames.join(QLatin1Char(';'))});
QLatin1String("--extractors"), extNames.join(QLatin1Char(';')),
QLatin1String("--no-validation")});
const auto extraPaths = m_repo.additionalSearchPaths();
for (const auto &p : extraPaths) {
args.push_back(QStringLiteral("--additional-search-path"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment