Skip to content

Commit

Permalink
Use flake8-style output
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Suchow authored and mpacer committed Sep 27, 2015
1 parent 69d5f96 commit d051ecf
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions proselint/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
proselint_path = os.path.dirname(os.path.realpath(__file__))


def log_error(line, column, error_code, msg):
def log_error(filename, line, column, error_code, msg):
"""Print a message to the command line."""
click.echo(str(line) + ":" +
str(column) + " \t" +
error_code + ": " +
msg + " " +
base_url + error_code)
click.echo(filename + ":" +
str(1 + line) + ":" +
str(1 + column) + ": " +
error_code + " " +
msg + " " + base_url + error_code)


@click.command()
Expand Down Expand Up @@ -49,9 +49,8 @@ def proselint(version, file):
else:
with open(file, "r") as f:
text = f.read()

for check in checks:
errors = check(text)
if errors:
for error in errors:
log_error(*error)
log_error(file, *error)

0 comments on commit d051ecf

Please sign in to comment.