org.sonar.plugins.javascript.lcov
Class CoverageSensor

java.lang.Object
  extended by org.sonar.plugins.javascript.lcov.CoverageSensor
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

public class CoverageSensor
extends Object
implements org.sonar.api.batch.Sensor


Field Summary
 
Fields inherited from interface org.sonar.api.batch.Sensor
FLAG_SQUID_ANALYSIS
 
Constructor Summary
CoverageSensor(JavaScript javascript, org.sonar.api.scan.filesystem.ModuleFileSystem moduleFileSystem)
           
 
Method Summary
 void analyse(org.sonar.api.resources.Project project, org.sonar.api.batch.SensorContext context)
           
static File getIOFile(File baseDir, String path)
          Returns a java.io.File for the given path.
protected  void saveMeasureFromLCOVFile(org.sonar.api.resources.Project project, org.sonar.api.batch.SensorContext context)
           
protected  void saveZeroValueForAllFiles(org.sonar.api.resources.Project project, org.sonar.api.batch.SensorContext context)
           
 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
 

Constructor Detail

CoverageSensor

public CoverageSensor(JavaScript javascript,
                      org.sonar.api.scan.filesystem.ModuleFileSystem moduleFileSystem)
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

saveZeroValueForAllFiles

protected void saveZeroValueForAllFiles(org.sonar.api.resources.Project project,
                                        org.sonar.api.batch.SensorContext context)

saveMeasureFromLCOVFile

protected void saveMeasureFromLCOVFile(org.sonar.api.resources.Project project,
                                       org.sonar.api.batch.SensorContext context)

toString

public String toString()
Overrides:
toString in class Object

getIOFile

public static File getIOFile(File baseDir,
                             String path)
Returns a java.io.File for the given path. If path is not absolute, returns a File with module base directory as parent path.



Copyright © 2011-2014 SonarSource and Eriks Nukis. All Rights Reserved.