Tabnine Logo
ResourceUtils.isUnitTestFile
Code IndexAdd Tabnine to your IDE (free)

How to use
isUnitTestFile
method
in
org.sonar.api.resources.ResourceUtils

Best Java code snippets using org.sonar.api.resources.ResourceUtils.isUnitTestFile (Showing top 5 results out of 315)

origin: org.codehaus.sonar.plugins/sonar-core-plugin

protected boolean shouldDecorate(final Resource resource) {
 return !ResourceUtils.isUnitTestFile(resource);
}
origin: org.codehaus.sonar/sonar-plugin-api

/**
 * @return whether a resource is a unit test class
 * @deprecated since 5.1 use {@link #isUnitTestFile(Resource)}
 */
@Deprecated
public static boolean isUnitTestClass(Resource resource) {
 return isUnitTestFile(resource);
}
origin: org.codehaus.sonar.plugins/sonar-core-plugin

public boolean shouldDecorateResource(Resource resource) {
 return ResourceUtils.isUnitTestFile(resource) || !ResourceUtils.isEntity(resource);
}
origin: org.codehaus.sonar/sonar-batch

@Override
public void decorate(Resource resource, DecoratorContext context) {
 if (ResourceUtils.isPersistable(resource) && !ResourceUtils.isUnitTestFile(resource)) {
  Long developmentCost = getDevelopmentCost(context);
  context.saveMeasure(new Measure(CoreMetrics.DEVELOPMENT_COST, Long.toString(developmentCost)));
  long debt = getMeasureValue(context, CoreMetrics.TECHNICAL_DEBT);
  double density = computeDensity(debt, developmentCost);
  context.saveMeasure(CoreMetrics.SQALE_DEBT_RATIO, 100.0 * density);
  SqaleRatingGrid ratingGrid = new SqaleRatingGrid(sqaleRatingSettings.getRatingGrid());
  context.saveMeasure(createRatingMeasure(ratingGrid.getRatingForDensity(density)));
 }
}
origin: org.sonarsource.sonarqube/sonar-batch

builder.setIsTest(ResourceUtils.isUnitTestFile(r));
builder.setLines(((InputFile) batchComponent.inputComponent()).lines());
org.sonar.api.resourcesResourceUtilsisUnitTestFile

Popular methods of ResourceUtils

  • isUnitTestClass
  • isFile
    Alias for #isEntity(Resource)
  • isEntity
  • isProject
    This method equal isRootProject(resource) or isModuleProject(resource)
  • isSet
  • isDirectory
    Alias for #isSpace(Resource)
  • isModuleProject
  • isRootProject
  • isPackage
  • isPersistable
  • isSubview
  • isView
  • isSubview,
  • isView,
  • isLibrary,
  • isSpace

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • JCheckBox (javax.swing)
  • JPanel (javax.swing)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now