Skip to content

Commit db67ab3

Browse files
committed
Use common attributes conversion
1 parent a904a41 commit db67ab3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sonar/util/rule_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
from typing import Any
2323
from sonar import utilities
24+
from sonar.util import common_json_helper
2425

2526

2627
def convert_rule_json(old_json: dict[str, Any]) -> dict[str, Any]:
27-
if "tags" in old_json:
28-
old_json["tags"] = utilities.list_to_csv(old_json["tags"])
29-
return old_json
28+
"""Converts a rule JSON from old to new export format"""
29+
return common_json_helper.convert_common_fields(old_json)
3030

3131

3232
def convert_rules_json(old_json: dict[str, Any]) -> dict[str, Any]:

0 commit comments

Comments
 (0)