CodeSmell

open class CodeSmell(val issue: Issue, val entity: Entity, val message: String, val metrics: List<Metric> = emptyList(), val references: List<Entity> = emptyList()) : Finding

A code smell indicates any possible design problem inside a program's source code. The type of a code smell is described by an Issue.

If the design problem results from metric violations, a list of Metric's can describe further the kind of metrics.

If the design problem manifests by different source locations, references to these locations can be stored in additional Entity's.

Inheritors

Constructors

Link copied to clipboard
constructor(issue: Issue, entity: Entity, message: String, metrics: List<Metric> = emptyList(), references: List<Entity> = emptyList())

Functions

Link copied to clipboard
open override fun compact(): String

Contract to format implementing object to a string representation.

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

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

Link copied to clipboard
open override fun messageOrDescription(): String

Explanation why this finding was raised.

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

Finds the first metric matching given type.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
Link copied to clipboard
open override val entity: Entity
Link copied to clipboard
open val file: String
Link copied to clipboard
open override val id: String
Link copied to clipboard
override val issue: Issue
Link copied to clipboard
open val location: Location
Link copied to clipboard
open override val message: String
Link copied to clipboard
open override val metrics: List<Metric>
Link copied to clipboard
open override val references: List<Entity>
Link copied to clipboard
open override val severity: SeverityLevel
Link copied to clipboard
open val signature: String
Link copied to clipboard