|
32 | 32 | import sonar.sqobject as sq |
33 | 33 | import sonar.platform as pf |
34 | 34 |
|
35 | | -from sonar import settings, tasks, measures, utilities, rules, issues |
| 35 | +from sonar import settings, tasks, measures, utilities, rules |
36 | 36 |
|
37 | 37 | import sonar.audit.problem as pb |
38 | 38 |
|
@@ -139,15 +139,15 @@ def get_issues(self, filters: types.ApiParams = None) -> dict[str, object]: |
139 | 139 |
|
140 | 140 | def count_third_party_issues(self, filters: types.ApiParams = None) -> dict[str, int]: |
141 | 141 | """Returns list of issues for a component, optionally on branches or/and PRs""" |
142 | | - from sonar.issues import component_filter |
| 142 | + from sonar.issues import component_filter, count_by_rule |
143 | 143 |
|
144 | 144 | third_party_rules = rules.third_party(self.endpoint) |
145 | 145 | params = utilities.replace_keys(_ALT_COMPONENTS, component_filter(self.endpoint), self.search_params()) |
146 | 146 | if filters is not None: |
147 | 147 | params.update(filters) |
148 | 148 | params["facets"] = "rules" |
149 | 149 | params["rules"] = [r.key for r in third_party_rules] |
150 | | - issues_count = {k: v for k, v in issues.count_by_rule(endpoint=self.endpoint, **params).items() if v > 0} |
| 150 | + issues_count = {k: v for k, v in count_by_rule(endpoint=self.endpoint, **params).items() if v > 0} |
151 | 151 | return issues_count |
152 | 152 |
|
153 | 153 | def get_hotspots(self, filters: types.ApiParams = None) -> dict[str, object]: |
|
0 commit comments