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:
@@ -6,6 +6,7 @@ import org.jetbrains.jet.cli.common.CLIConfigurationKeys
|
||||
import org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments;
|
||||
import org.jetbrains.jet.cli.jvm.K2JVMCompiler
|
||||
import org.jetbrains.jet.config.CompilerConfiguration
|
||||
import org.jetbrains.jet.cli.common.messages.MessageCollector
|
||||
|
||||
/**
|
||||
* Main for running the KDocCompiler
|
||||
@@ -23,6 +24,9 @@ class KDocCompiler() : K2JVMCompiler() {
|
||||
protected override fun configureEnvironment(configuration : CompilerConfiguration, arguments : K2JVMCompilerArguments) {
|
||||
super.configureEnvironment(configuration, arguments)
|
||||
configuration.add(CLIConfigurationKeys.COMPILER_PLUGINS, KDoc(arguments as KDocArguments))
|
||||
|
||||
// Suppress all messages from the compiler, because KDoc is not a compiler
|
||||
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE)
|
||||
}
|
||||
|
||||
protected override fun createArguments() : K2JVMCompilerArguments {
|
||||
|
||||
Reference in New Issue
Block a user