@cli.command("<STR_LIT>")<EOL>@click.pass_context<EOL>def generate_config(ctx):
path = click.prompt('<STR_LIT>', default=DEFAULT_CONFIG_FILE)<EOL>path = os.path.abspath(path)<EOL>dir_name = os.path.dirname(path)<EOL>if not os.path.exists(dir_name):<EOL><INDENT>click.echo(u"<STR_LIT>".format(dir_name), err=True)<EOL>ctx.exit(USAGE_ERROR_CODE)<EOL><DEDENT>elif os.path.exists(path):<EOL><INDENT>click.echo(u"<STR_LIT>".format(path), err=True)<EOL>ctx.exit(USAGE_ERROR_CODE)<EOL><DEDENT>LintConfigGenerator.generate_config(path)<EOL>click.echo(u"<STR_LIT>".format(path))<EOL>ctx.exit(<NUM_LIT:0>)<EOL>
Generates a sample gitlint config file.