Hi Team,
I am trying to use SonarQube in my local mac machine. I have followed the steps and successfully executed the command but on http://localhost:9000/projects?sort=-analysis_date page display This project is empty
Kindly help.
Also do SonarQube require login using GITHUB / BITBUCKET account?
I am trying to integrate continuous inspection, I have generated sonarlint.json and it’s showing more than 1k error of different type but when I am visiting on http://localhost:9000/projects?sort=-analysis_date ? than above page saying The Projects is empty
A much needed help is important with quick response.
Are you analyzing your code using a SonarQube Scanner? SonarLint doesn’t send your code to the server, that’s why you don’t see the project in the SonarQube UI.
Without the content of run-sonar-swift.sh, knowing that you ran it isn’t very helpful. However, I’m guessing from your earlier error message that your script simply compiles your project. You must also run a scanner. The docs should help with that.
You’ve provided the contents of your sonar-project.properties(?) file. I’m wondering where you got most of those properties. I don’t recognize any of these:
Fortunately, they won’t interfere with analysis; they’ll simply be ignored. Here’s the list of common parameters, which you might find helpful. However, this should be enough to get you started:
You’ll also need to provide sonar.host.url, altho whether that happens in the global scanner configuration (see first link), your sonar-project.properties or on the command line (-Dsonar.host.url=...) is up to you.
Hi ,
After run a scanner I am having certain errors using command sonar-scanner
FYI
java.lang.IllegalStateException: Failed to create lock in /**Project-Directory**/.scannerwork/.sonar_lock
at org.sonar.scanner.scan.DirectoryLock.tryLock(DirectoryLock.java:52)
at org.sonar.scanner.scan.ProjectLock.tryLock(ProjectLock.java:46)
at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:137)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.io.FileNotFoundException: /**Project-Directory**/.scannerwork/.sonar_lock (Permission denied)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:347)
at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:261)
at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
at org.sonar.scanner.scan.DirectoryLock.tryLock(DirectoryLock.java:46)
... 21 more
AND my sonar-scanner.properties file is
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here
#----- Default SonarQube server
sonar.host.url=http://localhost:9000
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
sonar.verbose=true
Does the user running the analysis property have full rights on the .scannerwork directory? Do you have background tasks running (e.g. a virus scanner) which could be preventing access?