Sonar-scanner, scan only php files in folder

maybe it is in sonar-scanner already, but I didn’t find any solution on google and here.
How can I setup for sonar-scanner scan only php files in folder? For example setup this in .properties file?

Hello, I can’t answer after your last post, so here is the link to logs (file was big to upload).


You can use the sonar.inclusions or sonar.exclusions parameters for this. (see)

Thank you. And is possible to skip errors during scan? Because there are “Error during SonarQube Scanner execution.”, so EXECUTION FAILURE.
Thank you.

No it is not possible.
Why would you want to skip the errors rather than fixing them ?

It would be good, for example for quick view revision of all project, in case you have only 2 ERROR files from 20000 files. Just for quick statitics, what do you think?
Of course, you can setup excluded files, but skipping would be much faster for statistics, without any deeper intervention.

Hello again, maybe I am doing something wrong, because EXECUTION FAILURE even only WARN message are on output. Is this normal, or is something wrong on my side? Because sonar finished with Project is not analyzed yet.

Please attach analysis logs so we can have a look at it.

Hello, here is output when scanner is launched. There are only warnings now.
File scanner-report doesn’t exist.
Thank you for info.
sonar-magento2.txt (4.9 KB)

Hello @shosek,
I do not see anything alarming in your logs even though the analysis fails.
To have a better view on what happens, could you please attach the same log in debug mode (simply add the -X parameter to the command line analysis) along with a zip of the log folder of the server.
Those logs are located in the $SONAR_HOME/logs directory.