Simplify the json building lines
This commit is contained in:
@@ -51,15 +51,15 @@ class Format(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def json_output(problem, filename):
|
def json_output(problem, filename):
|
||||||
output_dict = {}
|
return json.dumps({
|
||||||
output_dict["path"] = filename
|
"path": filename,
|
||||||
output_dict["line"] = problem.line
|
"line": problem.line,
|
||||||
output_dict["char"] = problem.column
|
"char": problem.column,
|
||||||
output_dict["description"] = problem.message
|
"description": problem.message,
|
||||||
output_dict["code"] = "YAMLLINT"
|
"code": "YAMLLINT",
|
||||||
output_dict["name"] = "YAMLLINT"
|
"name": "YAMLLINT",
|
||||||
output_dict["severity"] = problem.level
|
"severity": problem.level,
|
||||||
return json.dumps(output_dict)
|
})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def standard(problem, filename):
|
def standard(problem, filename):
|
||||||
|
|||||||
Reference in New Issue
Block a user