Package io. gitlab. arturbosch. detekt. api
Types
Primary use case for an AnnotationExcluder is to decide if a KtElement should be excluded from further analysis. This is done by checking if a special annotation is present over the element.
Defines the visiting mechanism for KtFile's.
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.
Provides a compact string representation.
Interface which is implemented by each Rule class to provide utility functions to retrieve specific or generic properties from the underlying detekt configuration file.
An extension which allows users to validate parts of the configuration.
Extension point which describes how findings should be printed on the console.
Represents a code smell for that can be auto corrected.
Default Context implementation.
Basic visitor which is used inside detekt. Guarantees a better looking name as the extended base class :).
Gather additional metrics about the analyzed kotlin file. Pay attention to the thread policy of each function!
Base interface of detection findings. Inherits a bunch of useful behaviour from sub interfaces.
Adds metric container behaviour.
LazyRegex class provides a lazy evaluation of a Regex pattern for usages inside Rules. It computes the value once when reaching the point of its usage and returns the same value when requested again.
Specifies a position within a source code fragment.
Metric type, can be an integer or double value. Internally it is stored as an integer, but the conversion factor and is double attributes can be used to retrieve it as a double value.
Any kind of notification which should be printed to the console. For example when using the formatting rule set, any change to your kotlin file is a notification.
Translates detekt's result container - Detektion - into an output report which is written inside a file.
Properties holder. Allows to store and retrieve any data.
Allows to intercept detekt's result container by listening to the initial and final state and manipulate the reported findings.
A rule defines how one specific code structure should look like. If code is found which does not meet this structure, it is considered as harmful regarding maintainability or readability.
A rule set provider, as the name states, is responsible for creating rule sets.
Context providing useful processing settings to initialize extensions.
Note: This will be replaced by SeverityLevel in future versions of Detekt.
The severity level for each Issue. This will be printed to the output, such as XML or Sarif.
Allows to assign a property just once. Further assignments result in IllegalStateException's.
Stores line and column information of a location.
Splits given text into parts and provides testing utilities for its elements. Basic use cases are to specify different function or class names in the detekt yaml config and test for their appearance in specific rules.
Stores character start and end positions of a text file.
Represents a code smell for which a specific metric can be determined which is responsible for the existence of this rule violation.
Provides a threshold attribute for this rule, which is specified manually for default values but can be also obtained from within a configuration object.
Experimental detekt api which may change on minor or patch versions.
ValuesWithReason is essentially the same as List of ValueWithReason. Due to type erasure we cannot use the list directly. Instances of this type should always created using the valuesWithReason factory method.
A ValueWithReason represents a single configuration value that may have an explanation as to why it is used.
Functions
Splits given String into a sequence of strings splited by the provided delimiters ("," by default).
Creates a delegated read-only property that can be used in ConfigAware objects. The name of the property is the key that is used during configuration lookup. The value of the property is evaluated only once.
Creates a delegated read-only property that can be used in ConfigAware objects. The name of the property is the key that is used during configuration lookup. The value of the property is evaluated and transformed only once.
Creates a delegated read-only property that can be used in ConfigAware objects. The name of the property is the key that is used during configuration lookup. The value of the property is evaluated only once.
Creates a delegated read-only property that can be used in ConfigAware objects. The name of the property is the key that is used during configuration lookup. The value of the property is evaluated and transformed only once.
Creates a delegated read-only property that can be used in ConfigAware objects. The name of the property is the key that is used during configuration lookup. If there is no such property, the value of the supplied fallbackProperty is also considered before using the defaultValue. The value of the property is evaluated only once.
Creates a delegated read-only property that can be used in ConfigAware objects. The name of the property is the key that is used during configuration lookup. If there is no such property, the value of the supplied fallbackProperty is also considered before using the defaultValue. The value of the property is evaluated and transformed only once.
Convert a simple pattern String to a Regex
This factory method can be used by rule authors to specify one or many configuration values along with an explanation for each value. For example:
This factory method can be used by rule authors to specify one or many configuration values along with an explanation for each value.