def build_config(ctx, target, config_path, c, extra_path, ignore, verbose, silent, debug):
config_builder = LintConfigBuilder()<EOL>try:<EOL><INDENT>if config_path:<EOL><INDENT>config_builder.set_from_config_file(config_path)<EOL><DEDENT>elif os.path.exists(DEFAULT_CONFIG_FILE):<EOL><INDENT>config_builder.set_from_config_file(DEFAULT_CONFIG_FILE)<EOL><DEDENT>config_builder.set_config_from_string_list(c)<EOL>if ignore:<EOL><INDENT>config_builder.set_option('<STR_LIT>', '<STR_LIT:ignore>', ignore)<EOL><DEDENT>if silent:<EOL><INDENT>config_builder.set_option('<STR_LIT>', '<STR_LIT>', <NUM_LIT:0>)<EOL><DEDENT>elif verbose > <NUM_LIT:0>:<EOL><INDENT>config_builder.set_option('<STR_LIT>', '<STR_LIT>', verbose)<EOL><DEDENT>if extra_path:<EOL><INDENT>config_builder.set_option('<STR_LIT>', '<STR_LIT>', extra_path)<EOL><DEDENT>if target:<EOL><INDENT>config_builder.set_option('<STR_LIT>', '<STR_LIT:target>', target)<EOL><DEDENT>if debug:<EOL><INDENT>config_builder.set_option('<STR_LIT>', '<STR_LIT>', debug)<EOL><DEDENT>config = config_builder.build()<EOL>return config, config_builder<EOL><DEDENT>except LintConfigError as e:<EOL><INDENT>click.echo(u"<STR_LIT>".format(ustr(e)))<EOL><DEDENT>ctx.exit(CONFIG_ERROR_CODE)<EOL>
Creates a LintConfig object based on a set of commandline parameters.