class DetektAnalyzer implements Analyzer<List<TypedDetektFinding>> {

    public DetektResult analyze() {
        final File baseDir = new File(AnalyzerConfig.Path.commonBase(config.getSourcePaths(KOTLIN)).getPath());
        try {
            final PrintStream printStream = new PrintStream(new LoggingOutputStream(), true, "utf-8");
            final ProcessingSettings settings = new ProcessingSettings(
                    singletonList(baseDir.toPath()), calcDetektConfig(), null, false, false, emptyList(), emptyList(),
                    LanguageVersion.KOTLIN_1_3, JvmTarget.JVM_1_8, Executors.newSingleThreadExecutor(),
                    printStream, printStream, false, false, emptyList());
            final DetektFacade df = DetektFacade.Companion.create(settings, ruleSetProviders(settings), emptyList());
            return createResult(baseDir, df.run());
        } catch (UnsupportedEncodingException e) {
            //cannot happen
            throw new AssertionError(e);
        }
    }

    public  DetektAnalyzer(AnalyzerConfig config, DetektCollector collector);
    private  DetektAnalyzer(AnalyzerConfig config, DetektCollector collector, Config detektConfig,
                           List<RuleSetProvider> ruleSetProviders);

}