Make KDoc generate documentation on red code

KDoc is not a compiler, so it should not care whether or not the code is valid.
Therefore suppress the compiler's exit code, errors and warnings in KDoc plugin
This commit is contained in:
Alexander Udalov
2014-03-14 18:18:48 +04:00
parent b1d76d6ab0
commit 0dfacd8b20
4 changed files with 43 additions and 9 deletions
@@ -206,7 +206,7 @@ public abstract class KotlinCompileMojoBase extends AbstractMojo {
}
};
final ExitCode exitCode = compiler.exec(messageCollector, arguments);
final ExitCode exitCode = executeCompiler(compiler, arguments, messageCollector);
switch (exitCode) {
case COMPILATION_ERROR:
@@ -258,6 +258,15 @@ public abstract class KotlinCompileMojoBase extends AbstractMojo {
return new K2JVMCompilerArguments();
}
@NotNull
protected ExitCode executeCompiler(
@NotNull CLICompiler compiler,
@NotNull CommonCompilerArguments arguments,
@NotNull MessageCollector messageCollector
) {
return compiler.exec(messageCollector, arguments);
}
/**
* Derived classes can register custom plugins or configurations
*/