File tree Expand file tree Collapse file tree 2 files changed +1
-35
lines changed
Expand file tree Collapse file tree 2 files changed +1
-35
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,7 @@ def from_json(cls, json_file: str | Path) -> Self:
120120
121121 result_set = cls ()
122122 for result in data .get ("issues" , []) + data .get ("hotspots" , []):
123- if result ["status" ].lower () in ("open" , "to_review" ):
124- result_set .add_result (SonarResult .from_result (result ))
123+ result_set .add_result (SonarResult .from_result (result ))
125124
126125 return result_set
127126 except Exception :
Original file line number Diff line number Diff line change @@ -216,39 +216,6 @@ def test_or(self, tmpdir):
216216 result2 ["python:S5659" ][Path ("code.py" )][0 ],
217217 ]
218218
219- def test_sonar_only_open_issues (self , tmpdir ):
220- issues = {
221- "issues" : [
222- {
223- "rule" : "python:S5659" ,
224- "status" : "OPEN" ,
225- "component" : "code.py" ,
226- "textRange" : {
227- "startLine" : 1 ,
228- "endLine" : 1 ,
229- "startOffset" : 1 ,
230- "endOffset" : 1 ,
231- },
232- },
233- {
234- "rule" : "python:S5659" ,
235- "status" : "RESOLVED" ,
236- "component" : "code.py" ,
237- "textRange" : {
238- "startLine" : 1 ,
239- "endLine" : 1 ,
240- "startOffset" : 1 ,
241- "endOffset" : 1 ,
242- },
243- },
244- ]
245- }
246- sonar_json1 = Path (tmpdir ) / "sonar1.json"
247- sonar_json1 .write_text (json .dumps (issues ))
248-
249- result = SonarResultSet .from_json (sonar_json1 )
250- assert len (result ["python:S5659" ][Path ("code.py" )]) == 1
251-
252219 def test_sonar_flows (self , tmpdir ):
253220 issues = {
254221 "issues" : [
You can’t perform that action at this time.
0 commit comments