org.sonar.plugins.javascript.unittest.jstestdriver
Class JsTestDriverSensor

java.lang.Object
  extended by 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)
           
 
Method Summary
 void analyse(org.sonar.api.resources.Project project, org.sonar.api.batch.SensorContext context)
           
protected  void collect(org.sonar.api.resources.Project project, org.sonar.api.batch.SensorContext context, File reportsDir)
           
protected  File getIOFile(String path)
          Returns a java.io.File for the given path.
protected  String getReportsDirectoryPath()
           
protected  File getUnitTestFile(List<File> testDirectories, String name)
           
protected  String getUnitTestFileName(String className)
           
 boolean shouldExecuteOnProject(org.sonar.api.resources.Project project)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileSystem

protected org.sonar.api.scan.filesystem.ModuleFileSystem fileSystem

settings

protected org.sonar.api.config.Settings settings
Constructor Detail

JsTestDriverSensor

public JsTestDriverSensor(org.sonar.api.scan.filesystem.ModuleFileSystem fileSystem,
                          org.sonar.api.config.Settings settings)
Method Detail

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.