integrated-application-development / delphilint

Delphi IDE package providing on-the-fly code analysis and linting, powered by SonarDelphi
GNU Lesser General Public License v3.0
80 stars 9 forks source link

Improve support for project analysis and global analysis tokens in Connected Mode #61

Closed fourls closed 1 month ago

fourls commented 1 month ago

SonarDelphi currently fails with an error when trying to use a project analysis or global analysis token, caused by an undocumented and likely incorrect behaviour of the SonarQube API (security hotspots cannot be retrieved by these tokens).

This PR alters issue retrieval to swallow 403 exceptions when accessing /api/hotspots/search, fixing this issue and allowing these tokens to be used. It also updates supplementary documentation to explain this, and recommend the use of user tokens if at all possible.

In addition, I've adjusted the validation behaviour for the Project Options window to disable the Save button if the project key or URL is blank, mitigating the need for #58 in the short term.

Fixes #59, possibly helps with #53