detekt-api
1.21.0-RC2

# Finding

interface Finding : Compactable, HasEntity, HasMetrics
Content copied to clipboard

Base interface of detection findings. Inherits a bunch of useful behaviour from sub interfaces.

Basic behaviour of a finding is that is can be assigned to an id and a source code position described as an entity. Metrics and entity references can also considered for deeper characterization.

## Functions

compact
Link copied to clipboard
abstract fun compact (): String
Content copied to clipboard

Contract to format implementing object to a string representation.

compactWithSignature
Link copied to clipboard
open fun compactWithSignature (): String
Content copied to clipboard

Same as compact except the content should contain a substring which represents this exact findings via a custom identifier.

messageOrDescription
Link copied to clipboard
abstract fun messageOrDescription (): String
Content copied to clipboard

Explanation why this finding was raised.

metricByType
Link copied to clipboard
open fun metricByType (type: String ): Metric ?
Content copied to clipboard

Finds the first metric matching given type.

## Properties

charPosition
Link copied to clipboard
open val charPosition : TextLocation
Content copied to clipboard
entity
Link copied to clipboard
abstract val entity : Entity
Content copied to clipboard
file
Link copied to clipboard
open val file : String
Content copied to clipboard
id
Link copied to clipboard
abstract val id : String
Content copied to clipboard
issue
Link copied to clipboard
abstract val issue : Issue
Content copied to clipboard
location
Link copied to clipboard
open val location : Location
Content copied to clipboard
message
Link copied to clipboard
abstract val message : String
Content copied to clipboard
metrics
Link copied to clipboard
abstract val metrics : List < Metric >
Content copied to clipboard
references
Link copied to clipboard
abstract val references : List < Entity >
Content copied to clipboard
severity
Link copied to clipboard
open val severity : SeverityLevel
Content copied to clipboard
signature
Link copied to clipboard
open val signature : String
Content copied to clipboard
startPosition
Link copied to clipboard
open val startPosition : SourceLocation
Content copied to clipboard

## Inheritors

CodeSmell
Link copied to clipboard