Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show severity in Github Workflow command message #1055

Merged
merged 4 commits into from Oct 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/ansiblelint/formatters/__init__.py
Expand Up @@ -123,10 +123,11 @@ def format(self, match: "MatchError", colored: bool = False) -> str:
file_path = self._format_path(match.filename or "")
line_num = match.linenumber
rule_id = match.rule.id
severity = match.rule.severity
violation_details = match.message
return (
f"::{level} file={file_path},line={line_num}"
f"::[E{rule_id}] {violation_details}"
f"::[E{rule_id}] [{severity}] {violation_details}"
JiriSko marked this conversation as resolved.
Show resolved Hide resolved
)

@staticmethod
Expand Down