<commit_before>package io.gitlab.arturbosch.detekt

/**
 * @author <NAME>
 */
@Suppress("LongParameterList")
open class DetektExtension(var version: String = "1.0.0.M10",
						   var input: String? = null,
						   var config: String? = null,
						   var configResource: String? = null,
						   var filters: String? = null,
						   var rulesets: String? = null,
						   var report: String? = null,
						   var output: Boolean = false,
						   var baseline: Boolean = false,
						   var parallel: Boolean = false,
						   var format: Boolean = false,
						   var useTabs: Boolean = false,
						   var disableDefaultRuleSets: Boolean = false,
						   var debug: Boolean = false) {

	fun convertToArguments(): MutableList<String> {
		return mutableListOf<String>().apply {
			input?.let { add("--project"); add(it) }
			config?.let { add("--config"); add(it) }
			configResource?.let { add("--config-resource"); add(it) }
			filters?.let { add("--filters"); add(it) }
			rulesets?.let { add("--rules"); add(it) }
			report?.let { add("--report"); add(it) }
			if (output) add("--output")
			if (baseline) add("--baseline")
			if (parallel) add("--parallel")
			if (format) add("--format")
			if (useTabs) add("--useTabs")
			if (disableDefaultRuleSets) add("--disable-default-rulesets")
		}
	}

}<commit_msg>Add flag `--generate-config` to DetektExtensions.kt - #48<commit_after>package io.gitlab.arturbosch.detekt

/**
 * @author <NAME>
 */
@Suppress("LongParameterList")
open class DetektExtension(var version: String = "1.0.0.M10",
						   var input: String? = null,
						   var config: String? = null,
						   var configResource: String? = null,
						   var generateConfig: Boolean = false,
						   var filters: String? = null,
						   var rulesets: String? = null,
						   var report: String? = null,
						   var output: Boolean = false,
						   var baseline: Boolean = false,
						   var parallel: Boolean = false,
						   var format: Boolean = false,
						   var useTabs: Boolean = false,
						   var disableDefaultRuleSets: Boolean = false,
						   var debug: Boolean = false) {

	fun convertToArguments(): MutableList<String> {
		return mutableListOf<String>().apply {
			input?.let { add("--project"); add(it) }
			config?.let { add("--config"); add(it) }
			configResource?.let { add("--config-resource"); add(it) }
			if (generateConfig) add("--generate-config")
			filters?.let { add("--filters"); add(it) }
			rulesets?.let { add("--rules"); add(it) }
			report?.let { add("--report"); add(it) }
			if (output) add("--output")
			if (baseline) add("--baseline")
			if (parallel) add("--parallel")
			if (format) add("--format")
			if (useTabs) add("--useTabs")
			if (disableDefaultRuleSets) add("--disable-default-rulesets")
		}
	}

}
{'fraction_non_alphanumeric': 0.16522366522366522, 'fraction_numerical': 0.004329004329004329, 'mean_word_length': 2.835408022130014, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '379916', 'n_tokens_mistral': 1082, 'n_tokens_neox': 862, 'n_words': 220}