Heena Patel
Heena Patel

Reputation: 105

Sonarqube analysis not working

I have set up SonarQube server on my local system and run sonar runner. it will run good with .html file but when i am trying to run with php file, it failed and showing error like:

java illegal language exception blame sample.php file.

I installed all plugin as below.

but it is not working.

Upvotes: 2

Views: 2977

Answers (2)

Sarath.B
Sarath.B

Reputation: 455

One more possibility to end up with this error "java illegal language exception blame file-name file" is that your repository could have been shallow cloned with depth=1.

enter image description here

In my case, we configured our jenkins to do a shallow clone with depth = 1 and this error came up. When I changed the depth = 2 and re ran the jenkins job, sonar:sonar worked fine and results are pushed to the sonar server.

Look at the field "Shallow clone depth" in the attached image. Hope this helps.

Upvotes: 0

You get this blame error because you are trying to analyze a set of files on which you have uncommitted changes.

To fix this:

  • Either you make sure that you a running an analysis on source code that has been freshly checked out from your version control system (and not changed since then-
  • Or you tell SonarQube to not try to get SCM information
    • You will find this in the "Administration > Configuration > SCM" settings page: it is called "Disable the SCM Sensor"

Upvotes: 5

Related Questions