@cli.command("generate-config")
@click.pass_context
def generate_config(ctx):
    path = click.prompt('Please specify a location for the sample gitlint config file', default=DEFAULT_CONFIG_FILE)
    path = os.path.abspath(path)
    dir_name = os.path.dirname(path)
    if not os.path.exists(dir_name):
        click.echo("Error: Directory '{0}' does not exist.".format(dir_name), err=True)
        ctx.exit(USAGE_ERROR_CODE)
    elif os.path.exists(path):
        click.echo("Error: File \"{0}\" already exists.".format(path), err=True)
        ctx.exit(USAGE_ERROR_CODE)

    LintConfigGenerator.generate_config(path)
    click.echo("Successfully generated {0}".format(path))
    ctx.exit(0)
Generates a sample gitlint config file.
dataset/ETHPy150Open jorisroovers/gitlint/gitlint/cli.py/generate_config