Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No code errors were analyzed #79

Closed
FirstDKS521 opened this issue Dec 7, 2023 · 6 comments
Closed

No code errors were analyzed #79

FirstDKS521 opened this issue Dec 7, 2023 · 6 comments
Assignees
Labels
bug Something isn't working stale

Comments

@FirstDKS521
Copy link

Mac OS 14.0

The latest version of sonar-apple plug-in, the installation location is no problem

Latest version of SonarQube

In the root directory of the project, execute the sonar-scanner command.
After success, no code smell related to OC and Swift can be seen on the SonarQube platform.
Only js, HTML, and css languages are detected. Why?

@FirstDKS521 FirstDKS521 added the bug Something isn't working label Dec 7, 2023
@gaelfoppolo gaelfoppolo self-assigned this Dec 11, 2023
@gaelfoppolo
Copy link
Contributor

Hi @FirstDKS521,
Can you share your sonar-project.properties?
Did you run any xcodebuild command before sonar-scanner like explained in the README?

@FirstDKS521
Copy link
Author

Hi @FirstDKS521, Can you share your sonar-project.properties? Did you run any xcodebuild command before sonar-scanner like explained in the README?

sonar-project.properties:
sonar.token=xxx
sonar.host.url=http://localhost:9000
sonar.projectKey=aaa
sonar.projectName=aaa
sonar.apple.workspace=aaa.xcworkspace
sonar.apple.project=aaa.xcodeproj
sonar.sourceEncoding=UTF-8

I did not execute the xcodebuild command before executing sonar-scanner;
Because even if the xcodebuild command is executed, the generated compile_commands.json file is larger than 20M and cannot be uploaded;
Let's look at the sonar documentation. The sonar-scanner command can directly scan the source code and does not rely on the compile_commands.json file, right?
Thanks~

@gaelfoppolo
Copy link
Contributor

Well first, your sonar-project.properties is missing sonar.sources or sonar.tests so you might want to check that first. See the example one in the README.

Sonar is indexing the code source yes, but it does nothing else. It's the plugin that does the scanning, gather the results and then upload them to SonarQube, at the end of the analysis.

As explained at the top of the README, each feature provided by the plugin require a tool.
You don't have to run xcodebuild, but you will miss the majority of information that this plugin provide.

Please:

  • configure your sonar-project.properties properly
  • install the tools listed in the README (in you want the feature associated)
  • run xcodebuild command (eee the example one in the README and tune it for your project)

You can launch sonar-scanner -X to get debug log and get a better understanding of your issues.

Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Mar 11, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@pravindodia
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants