Can I Scan entire source directory without any build tool?

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

Hi,

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

 
Ann

When I am trying this version I get this error.

How can I resolve it.

Thanks for your help

Hi,

What command did you run?

 
Ann

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

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

I am doing it again this time.

When I run above command D:\DevToolsManagement\sonar-scanner-cli-3.3.0.1492-windows\sonar-scanner-3.3.0.1492-windows\bin\sonar-scanner.bat under project folder. In which i also have
sonar-project.properties
It gives…

Error during SonarQube Scanner execution
ERROR: Please provide compiled classes of your project with sonar.java.binaries property

However I dont have any compiled libs.
Is it possible to scan entire src folder as raw project without any compiled classed or libs?

Hi,

No, it’s not possible to analyze Java without first compiling it. The same goes for C/C++/Objective-C, and C#. IIRC, none of the other languages require compilation for analysis.

 
Ann

Thanks that would help.

You are great