Skip to content

Commit 43df1c9

Browse files
committed
Include help url with JSON output format
Related: codeclimate/platform#68
1 parent 23b63ae commit 43df1c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/ansiblelint/formatters/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ def format_result(self, matches: list[MatchError]) -> str:
150150
issue["type"] = "issue"
151151
issue["check_name"] = match.tag or match.rule.id # rule-id[subrule-id]
152152
issue["categories"] = match.rule.tags
153+
if match.rule.url:
154+
# https://github.com/codeclimate/platform/issues/68
155+
issue["url"] = match.rule.url
153156
issue["severity"] = self._severity_to_level(match)
154157
issue["description"] = self.escape(str(match.message))
155158
issue["fingerprint"] = hashlib.sha256(

0 commit comments

Comments
 (0)