Skip to content

Commit

Permalink
Merge pull request #31 from fnxpt/defaultFile
Browse files Browse the repository at this point in the history
Sonarqube primary location information
  • Loading branch information
ajinabraham authored Feb 1, 2022
2 parents 527abd0 + 96e99aa commit 6bd3e98
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mobsfscan/formatters/sonarqube.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ def get_sonarqube_issue(mobsfscan_issue):
issue_data = mobsfscan_issue['metadata']
# Handle missing controls
if not mobsfscan_issue.get('files'):
primary_location = None
text_range = {
'startLine': 1,
'endLine': 0,
}
location = {
'message': issue_data['description'],
'filePath': None,
'textRange': text_range,
}
primary_location = location
else:
for ix, file in enumerate(mobsfscan_issue['files']):
text_range = {
Expand Down

0 comments on commit 6bd3e98

Please sign in to comment.