Closed frozenchocolate closed 1 year ago
Hello @frozenchocolate
To work Periphery use the source code indexed by the build system, in your case it should be xcodebuild
(unless you are using Bazel or another one). This is called the index store and it's part of the derived data.
In the Run analysis section, there is an xcodebuild
command with a specific flag to change the derived data location, -derivedDataPath
.
The value of the parameter sonar.apple.periphery.indexStorePath
should match this -derivedDataPath
flag with the path of the index store, like shown in the README.
Periphery also needs to know the scheme(s) and the target(s), so you also need to provide values for sonar.apple.periphery.schemes
and sonar.apple.periphery.targets
, like shown in the README.
Additionnally, if you still have trouble using Periphery with the plugin, you can use the flag -X
(eg: sonar-scanner -X
). This will run in debug mode the scanner and display the exact Periphery command used and the exact error encountered. You can then compare with the one you are running locally.
Please tell us if it helped solve your issue.
Thank you for your reply.
For some reason the periphery scan result is visible in sonarqube only if I
did not set the "sonar.apple.periphery" properties.
Aside from that I am now trying to make some changes but when I generate
the binary file with mvn clean package
the resulting .jar file is a 61KB
file that doesn't work on Sonarqube.
How do I generate the correct binary file starting from your source code?
Sorry for all the questions but I am stuck with my project and need help to progress.
Thank you very much for your time
Il giorno mer 5 lug 2023 alle ore 10:15 Gaël Foppolo < @.***> ha scritto:
Hello @frozenchocolate https://github.com/frozenchocolate
To work Periphery use the source code indexed by the build system, in your case it should be xcodebuild (unless you are using Bazel or another one). This is called the index store and it's part of the derived data. In the Run analysis https://github.com/insideapp-oss/sonar-apple#run-analysis section, there is an xcodebuild command with a specific flag to change the derived data location, -derivedDataPath. The value of the parameter sonar.apple.periphery.indexStorePath should match this -derivedDataPath flag with the path of the index store, like shown in the README.
Periphery also needs to know the scheme(s) and the target(s), so you also need to provide values for sonar.apple.periphery.schemes and sonar.apple.periphery.targets, like shown in the README.
Additionnally, if you still have trouble using Periphery with the plugin, you can use the flag -X (eg: sonar-scanner -X). This will run in debug mode the scanner and display the exact Periphery command used and the exact error encountered. You can then compare with the one you are running locally.
Please tell us if it helped solve your issue.
— Reply to this email directly, view it on GitHub https://github.com/insideapp-oss/sonar-apple/issues/73#issuecomment-1621354683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYI3AHSGIGGK6GWSTUUCA6DXOUWDPANCNFSM6AAAAAAZ55IUZA . You are receiving this because you were mentioned.Message ID: @.***>
Can I take a look at your sonar-project.properties
configuration? This is weird.
What kind of changes are you trying to make? Maybe it can also benefit to the project :)
Try running the following command instead: mvn package --file pom.xml
If it still doesn't work, please open a new issue and close this one, since this is a different topic.
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Feature Request
It would be amazing to explain better how to use Periphery with your tool
Motivation Behind Feature
I can't see anything regarding the unused code. Can you give me an example of what value I should put in the
sonar.apple.periphery.indexStorePath
field? I put[...]/Index.noindex/DataStore
but maybe it's not the right path? Or is there something else I need to configure in my SonarQube prject? If I run Periphery locally on my machine it works normallyP.S. Thank you for your amazing plugin, it's brilliant