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
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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