Configuration issues with developer edition

We are currently running a Developer Edition.
Version 9.4.0.54424

We configured developer edition through github actions.

The issue that we are experiencing is we have 7 folders in our source code file and sonarqube is analyzing only one file and rest of the files are not being analysed, not sure if we have missed any thing related to configuration, could you please help us to analyse the code accurately.

Hey there.

Can you share your GitHub Actions YML file?

Hi Colin,

Thank you for your reply, I will look into the information you have sent.

Regards,
Anil.

Thanks.

Most commonly, when this happens with .NET Code, the issue boils down to how projects are categorized.

Take a look at this wiki page: Analysis of product projects vs. test projects · SonarSource/sonar-scanner-msbuild Wiki · GitHub

<?xml version="1.0" encoding="utf-8" ?>
<SonarQubeAnalysisProperties  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">

  <Property Name="sonar.host.url">https://sonarqube.xxxxxx-xxxxx.xx/</Property>
  <Property Name="sonar.exclusions">./BuildScripts/**,./DatabaseMigrations/**</Property>
  <Property Name="sonar.cs.vstest.reportsPaths">**/*.trx</Property>
  <Property Name="sonar.cs.opencover.reportsPaths">**/coverage.opencover.xml</Property> 
</SonarQubeAnalysisProperties>

this is the “SonarQube.Analysis.xml” file that is being used.

we are using github actions to trigger the workflow.

Please advise if we have to make any changes in :SonarQube.Analysis.xml

Hey there.

This file wasn’t mentioned in the documentation I linked. [Have you read through it?]( Analysis of product projects vs. test projects · SonarSource/sonar-scanner-msbuild Wiki · GitHub )

I would pay attention to this section, which helps you find in the logs how your projects are categornized.

Projects categorized as Test projects will behave as in the screenshot of you’ve shared – having no Lines of Code calculated, but appearing in the Code tab and having some Code Smells raised. You want to make sure your projects (that make up your .NET solution) are being categorized as product code.

I have made the changes accordingly and trying to run sonarqube and I am seeing the below error.

{“errors”:[{“msg”:“Unknown url : /api/server/version…”}]}

<?xml version="1.0" encoding="utf-8" ?>
<SonarQubeAnalysisProperties  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">

	<Property Name="sonar.host.url">https://sonarqube.xxxxxxxxx/</Property>
	<Property Name="sonar.exclusions">./BuildScripts/**,./DatabaseMigrations/**</Property>
       	<Property Name="sonar.cs.vstest.reportsPaths">**/*.trx</Property>
	<Property Name="sonar.verbose">true</Property>
	<Property Name="sonar.cs.opencover.reportsPaths">**/coverage.opencover.xml</Property>
	<PropertyGroup>
        <!-- Project is not a test project -->
        <SonarQubeTestProject>false</SonarQubeTestProject>
        </PropertyGroup>
</SonarQubeAnalysisProperties>

    <!-- # Define separate root directories for sources and tests
 sonar.sources = src/
 sonar.tests = test/ -->


	
        <ItemGroup>
          <SonarQubeSetting Include="sonar.stylecop.projectFilePath">
          <Value>$(MSBuildProjectFullPath)</Value>
        </SonarQubeSetting>
        </ItemGroup>
</SonarQubeAnalysisProperties>

I have tried multiple ways however I am not able to resolve the issue , Is there any one who could help. 

I have no issues with react code, Issue is only with .net code


https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/