Skip to content

Commit

Permalink
Fix format string to use square brackets
Browse files Browse the repository at this point in the history
Fix format string to also use square brackets with the `--nocolor`
option.

Fixes #86.

Signed-off-by: Roald Nefs <roald@warpnet.nl>
  • Loading branch information
roaldnefs committed Oct 31, 2019
1 parent b74d5da commit fdcfd7c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions saltlint/formatters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ def format(self, match, colored=False):
u'{0}{1}{2}'.format(color['MAGENTA'], match.line, color['ENDC'])
)
else:
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
match.line)
return formatstr.format(
u'[{0}]'.format(match.rule.id),
match.message,
match.filename,
match.linenumber,
match.line)


class JsonFormatter(object):
Expand Down

0 comments on commit fdcfd7c

Please sign in to comment.