Class FileTypeSensor
java.lang.Object
org.sonarsource.dotnet.shared.plugins.FileTypeSensor
- All Implemented Interfaces:
org.sonar.api.batch.sensor.Sensor,org.sonar.api.scanner.sensor.ProjectSensor
@ScannerSide
public class FileTypeSensor
extends Object
implements org.sonar.api.batch.sensor.Sensor
This class is a non-global sensor used to count the type of files in the .NET projects (i.e. Scanner modules).
Why is this needed? - the Scanner for MSBuild categorizes projects as MAIN or TEST (see https://github.com/SonarSource/sonar-scanner-msbuild/wiki/Analysis-of-product-projects-vs.-test-projects) - in SQ / SC, users can specify which files should be considered as MAIN (sources) or TEST (test sources) (see https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/) - the categorization is not obvious, so this additional information should help users debug when needed
-
Constructor Summary
ConstructorsConstructorDescriptionFileTypeSensor(ProjectTypeCollector projectTypeCollector, DotNetPluginMetadata pluginMetadata) -
Method Summary
-
Constructor Details
-
Method Details
-
describe
public void describe(org.sonar.api.batch.sensor.SensorDescriptor descriptor) - Specified by:
describein interfaceorg.sonar.api.scanner.sensor.ProjectSensor- Specified by:
describein interfaceorg.sonar.api.batch.sensor.Sensor
-
execute
public void execute(org.sonar.api.batch.sensor.SensorContext context) - Specified by:
executein interfaceorg.sonar.api.scanner.sensor.ProjectSensor- Specified by:
executein interfaceorg.sonar.api.batch.sensor.Sensor
-