org.sonar.plugins.javascript.unittest.jstestdriver
Class JsTestDriverSensor
java.lang.Object
org.sonar.plugins.javascript.unittest.jstestdriver.JsTestDriverSensor
- All Implemented Interfaces:
- org.sonar.api.batch.CheckProject, org.sonar.api.batch.Sensor, org.sonar.api.BatchComponent, org.sonar.api.BatchExtension, org.sonar.api.Extension
- Direct Known Subclasses:
- JsTestSensor
public class JsTestDriverSensor
- extends Object
- implements org.sonar.api.batch.Sensor
|
Field Summary |
protected org.sonar.api.scan.filesystem.ModuleFileSystem |
fileSystem
|
protected org.sonar.api.config.Settings |
settings
|
| Fields inherited from interface org.sonar.api.batch.Sensor |
FLAG_SQUID_ANALYSIS |
|
Constructor Summary |
JsTestDriverSensor(org.sonar.api.scan.filesystem.ModuleFileSystem fileSystem,
org.sonar.api.config.Settings settings)
|
fileSystem
protected org.sonar.api.scan.filesystem.ModuleFileSystem fileSystem
settings
protected org.sonar.api.config.Settings settings
JsTestDriverSensor
public JsTestDriverSensor(org.sonar.api.scan.filesystem.ModuleFileSystem fileSystem,
org.sonar.api.config.Settings settings)
shouldExecuteOnProject
public boolean shouldExecuteOnProject(org.sonar.api.resources.Project project)
- Specified by:
shouldExecuteOnProject in interface org.sonar.api.batch.CheckProject
analyse
public void analyse(org.sonar.api.resources.Project project,
org.sonar.api.batch.SensorContext context)
- Specified by:
analyse in interface org.sonar.api.batch.Sensor
collect
protected void collect(org.sonar.api.resources.Project project,
org.sonar.api.batch.SensorContext context,
File reportsDir)
getUnitTestFileName
protected String getUnitTestFileName(String className)
getUnitTestFile
protected File getUnitTestFile(List<File> testDirectories,
String name)
getIOFile
protected File getIOFile(String path)
- Returns a java.io.File for the given path.
If path is not absolute, returns a File with project base directory as parent path.
getReportsDirectoryPath
protected String getReportsDirectoryPath()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011-2014 SonarSource and Eriks Nukis. All Rights Reserved.