docs: def build_config(ctx, target, config_path, c, extra_path, ignore, verbose, silent, debug):
      """ Creates a LintConfig object based on a set of commandline parameters. """
      config_builder = LintConfigBuilder()
      try:
          # Config precedence:
          # First, load default config or config from configfile
          if config_path:
              config_builder.set_from_config_file(config_path)
          elif os.path.exists(DEFAULT_CONFIG_FILE):
              config_builder.set_from_config_file(DEFAULT_CONFIG_FILE)
  
          # Then process any commandline configuration flags
          config_builder.set_config_from_string_list(c)
  
          # Finally, overwrite with any convenience commandline flags
          if ignore:
              config_builder.set_option('general', 'ignore', ignore)
          if silent:
              config_builder.set_option('general', 'verbosity', 0)
          elif verbose > 0:
              config_builder.set_option('general', 'verbosity', verbose)
  
          if extra_path:
              config_builder.set_option('general', 'extra-path', extra_path)
  
          if target:
              config_builder.set_option('general', 'target', target)
  
          if debug:
              config_builder.set_option('general', 'debug', debug)
  
          config = config_builder.build()
  
          return config, config_builder
      except LintConfigError as e:
          click.echo(u"Config Error: {0}".format(ustr(e)))
      ctx.exit(CONFIG_ERROR_CODE)