Can I Scan entire source directory without any build tool?

java
sonarqube
scanner
(Cipher) #1

I am using latest version of SonarQube
I have project (Multimodule) in which we don’t use any build tool, to create jar we just export.
Now, How can I scan any code folder without having any build tool?
Is it feasible?

Regards

(G Ann Campbell) #2

Hi,

It sounds like you’re looking for the vanilla SonarQube Scanner.

 
Ann

(Cipher) #3

When I am trying this version I get this error.

How can I resolve it.

Thanks for your help

(G Ann Campbell) #4

Hi,

What command did you run?

 
Ann

(Cipher) #5

I ran,

C:\Users\ina151bhamalg\Downloads\maven-samples-master\sonar-scanner-cli-3.3.0.1492-windows\sonar-scanner-3.3.0.1492-windows\bin\sonar-scanner.bat sonar-scanner

And I have configured my sonar server in conf under sonar-scanner-cli

(G Ann Campbell) #6

Hi,

Try this instead:

C:\Users\ina151bhamalg\Downloads\maven-samples-master\sonar-scanner-cli-3.3.0.1492-windows\sonar-scanner-3.3.0.1492-windows\bin\sonar-scanner.bat

Why? You need to either put the .bat file in your path and call sonar-scanner.bat or use the full path. What you actually did in this instance is pass “sonar-scanner” as an argument to the scanner itself. But the scanner doesn’t take that kind of argument*, which resulted in the error message you got.

You can define values on the command line, but those arguments all start with -D

 
HTH,
Ann