### configUris Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-setup-context/config-uris.html Represents the collection of URIs that were used to configure the setup context. This is useful for understanding where configuration settings were loaded from. ```APIDOC ## configUris abstract val configUris: Collection ### Description All config locations which where used to create config. ### Property - **configUris** (Collection) - The collection of configuration URIs. ``` -------------------------------- ### startsWith Source: https://detekt.dev/kdoc/detekt-test-assertj/dev.detekt.test.assertj/-findings-assert/index.html Asserts that the actual findings start with the given sequence of findings. ```APIDOC ## startsWith ### Description Asserts that the actual findings start with the given sequence of findings. ### Method @SafeVarargs fun ### Parameters - **sequence** (vararg Finding?) ### Returns FindingsAssert? ``` -------------------------------- ### hasStartSourceLocation(expected) Source: https://detekt.dev/kdoc/detekt-test-assertj/dev.detekt.test.assertj/-finding-assert/has-start-source-location.html Asserts that the finding's start source location matches the provided `SourceLocation` object. ```APIDOC ## hasStartSourceLocation(expected: SourceLocation) ### Description Asserts that the finding's start source location matches the provided `SourceLocation` object. ### Method `hasStartSourceLocation` ### Parameters #### Path Parameters - **expected** (SourceLocation) - Required - The expected `SourceLocation` object. ### Returns `FindingAssert` - The assertion object for further chaining. ``` -------------------------------- ### Location Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-issue/-location/-location.html The Location constructor takes four parameters: the starting source location, the ending source location, the text location, and the path. ```APIDOC ## Location Constructor ### Description Initializes a new instance of the `Location` class. ### Parameters - **source** (SourceLocation) - The starting source location. - **endSource** (SourceLocation) - The ending source location. - **text** (TextLocation) - The text location. - **path** (Path) - The path associated with the location. ``` -------------------------------- ### hasStartSourceLocation(line, column) Source: https://detekt.dev/kdoc/detekt-test-assertj/dev.detekt.test.assertj/-finding-assert/has-start-source-location.html Asserts that the finding's start source location matches the provided line and column. ```APIDOC ## hasStartSourceLocation(line: Int, column: Int) ### Description Asserts that the finding's start source location matches the provided line and column. ### Method `hasStartSourceLocation` ### Parameters #### Path Parameters - **line** (Int) - Required - The expected starting line number. - **column** (Int) - Required - The expected starting column number. ### Returns `FindingAssert` - The assertion object for further chaining. ``` -------------------------------- ### init Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-extension/init.html Sets up the extension by querying common paths and configuration options. ```APIDOC ## init ### Description Sets up the extension by querying common paths and configuration options. ### Signature `open fun init(context: SetupContext)` ``` -------------------------------- ### getStartOffsetInParent Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the starting offset of this element within its parent. ```APIDOC ## getStartOffsetInParent ### Description Gets the starting offset of this element within its parent. ### Method Signature open override fun getStartOffsetInParent(): Int ``` -------------------------------- ### Input Files Configuration Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.report/-report-merge-task/input.html The `input` property of the `ReportMergeTask` allows you to define the collection of files to be processed. It is annotated with `@get:InputFiles` and `@get:PathSensitive` to indicate that it represents input files and that their paths are sensitive. ```APIDOC ## Property: input ### Description Specifies the collection of input files for the task. The paths of these files are considered sensitive for incremental builds. ### Type `ConfigurableFileCollection` ### Annotations - `@get:InputFiles`: Marks this property as a source of input files for the task. - `@get:PathSensitive(value = PathSensitivity.RELATIVE)`: Indicates that the relative paths of the input files are important for determining task up-to-dateness. ``` -------------------------------- ### SetupContext Functions Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-setup-context/index.html Functions available within the SetupContext for retrieving and registering properties. ```APIDOC ## Functions ### getOrNull Link copied to clipboard inline fun PropertiesAware.getOrNull(key: String): T? Allows to retrieve stored properties in a type safe way. ### register Link copied to clipboard abstract fun register(key: String, value: Any) Binds a given value with given key and stores it for later use. ``` -------------------------------- ### get(processingSpec: ProcessingSpec): Detekt Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-detekt-provider/get.html Configures and returns a Detekt instance based on the provided ProcessingSpec. ```APIDOC ## get(processingSpec: ProcessingSpec): Detekt ### Description Configure a Detekt instance based on given ProcessingSpec. ### Method `get` ### Parameters #### Path Parameters - **processingSpec** (ProcessingSpec) - Required - The specification used to configure Detekt. ``` -------------------------------- ### getParent Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the parent of this element. ```APIDOC ## getParent ### Description Gets the parent of this element. ### Method Signature open override fun getParent(): PsiElement ``` -------------------------------- ### SetupContext Properties Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-setup-context/index.html Properties available within the SetupContext for configuration and logging. ```APIDOC ## Properties ### basePath Link copied to clipboard abstract val basePath: Path ### config Link copied to clipboard abstract val config: Config Configuration which is used to set up detekt. ### configUris Link copied to clipboard abstract val configUris: Collection All config locations which where used to create config. ### errorChannel Link copied to clipboard abstract val errorChannel: Appendable The channel to log all the errors. ### outputChannel Link copied to clipboard abstract val outputChannel: Appendable The channel to log all the output. ### properties Link copied to clipboard abstract val properties: Map Raw properties. ``` -------------------------------- ### Run Analysis without Files Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-detekt/run.html Initiates the Detekt analysis process without specifying individual files. This might use a default configuration or project setup. ```APIDOC ## run() ### Description Runs the Detekt analysis with default settings. ### Signature abstract fun run(): AnalysisResult ``` -------------------------------- ### onStart Function Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-file-process-listener/on-start.html This function is part of the FileProcessListener interface and is intended for lightweight pre-processing before the main analysis. It receives a list of KtFile objects. ```APIDOC ## onStart open fun onStart(files: List) ### Description Use this to gather some additional information for the real onProcess function. This calculation should be lightweight as this method is called from the main thread. ### Parameters #### Path Parameters - **files** (List) - Description: A list of KtFile objects to be processed. ``` -------------------------------- ### getName Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the name of this element. ```APIDOC ## getName ### Description Gets the name of this element. ### Method Signature open override fun getName(): String? ``` -------------------------------- ### getManager Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the PsiManager for this element. ```APIDOC ## getManager ### Description Gets the PsiManager for this element. ### Method Signature open override fun getManager(): PsiManager ``` -------------------------------- ### visit(root: KtFile) Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/visit.html Initializes the visiting process for a given KtFile. This function can be overridden to customize the visiting behavior. ```APIDOC ## visit(root: KtFile) ### Description Init function to start visiting the KtFile. Can be overridden to start a different visiting process. ### Method open fun ### Parameters #### Path Parameters - **root** (KtFile) - Required - The root KtFile to visit. ``` -------------------------------- ### DefaultConfigurationProvider.init Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-default-configuration-provider/index.html Initializes the configuration provider with extension specifications. ```APIDOC ## init ### Description Initializes the configuration provider with extension specifications. ### Signature ```kotlin abstract fun init(extensionsSpec: ExtensionsSpec) ``` ### Parameters #### Path Parameters - **extensionsSpec** (ExtensionsSpec) - Description of the extensions specification. ``` -------------------------------- ### getLanguage Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the language of this element. ```APIDOC ## getLanguage ### Description Gets the language of this element. ### Method Signature open override fun getLanguage(): Language ``` -------------------------------- ### Location Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-location/-location.html Constructs a new Location object. This constructor takes four parameters: `source`, `endSource`, `text`, and `path`. `source` and `endSource` define the start and end of the location in the source file. `text` provides details about the text content at that location. `path` specifies the path to the source file. ```APIDOC ## Location Constructor ### Description Constructs a new `Location` object. ### Signature constructor(source: SourceLocation, endSource: SourceLocation, text: TextLocation, path: Path) ### Parameters - **source** (SourceLocation) - The starting location in the source file. - **endSource** (SourceLocation) - The ending location in the source file. - **text** (TextLocation) - Information about the text at this location. - **path** (Path) - The path to the source file. ``` -------------------------------- ### visitFile Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html Entry point for visiting a file. Includes pre- and post-visit hooks and checks if the rule should be triggered. ```APIDOC ## visitFile ### Description Entry point for visiting a file. Includes pre- and post-visit hooks and checks if the rule should be triggered. ### Signature ```kotlin fun visitFile(root: KtFile, languageVersionSettings: LanguageVersionSettings): List ``` ``` -------------------------------- ### getContext Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the context of this element. ```APIDOC ## getContext ### Description Gets the context of this element. ### Method Signature open override fun getContext(): PsiElement? ``` -------------------------------- ### getChildren Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the children of this element. ```APIDOC ## getChildren ### Description Gets the children of this element. ### Method Signature open override fun getChildren(): Array ``` -------------------------------- ### Visit KtFile Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html Initializes the visiting process for a KtFile. This method can be overridden to customize the visiting logic. ```APIDOC ## visitKtFile ### Description Init function to start visiting the KtFile. Can be overridden to start a different visiting process. ### Signature ```kotlin open fun visit(root: KtFile) ``` ``` -------------------------------- ### getUseScope Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the scope in which this element is used. ```APIDOC ## getUseScope ### Description Gets the scope in which this element is used. ### Method Signature open override fun getUseScope(): SearchScope ``` -------------------------------- ### run() Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-detekt/index.html Runs the detekt analysis with the default configuration. ```APIDOC ## run() ### Description Runs the detekt analysis with the default configuration. ### Signature abstract fun run(): AnalysisResult ``` -------------------------------- ### getText Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the text content of this element. ```APIDOC ## getText ### Description Gets the text content of this element. ### Method Signature open override fun getText(): String ``` -------------------------------- ### KtElement.accept(p0) Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/accept.html Accepts a PsiElementVisitor. ```APIDOC ## accept(p0) ### Description Accepts a PsiElementVisitor. ### Method `open override fun accept(p0: PsiElementVisitor)` ``` -------------------------------- ### DetektKotlinCompilerPlugin Constructor Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.plugin/-detekt-kotlin-compiler-plugin/index.html Initializes a new instance of the DetektKotlinCompilerPlugin. ```APIDOC ## DetektKotlinCompilerPlugin() ### Description Constructs a new DetektKotlinCompilerPlugin. ### Constructor `DetektKotlinCompilerPlugin()` ``` -------------------------------- ### getResolveScope Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the scope in which this element is resolved. ```APIDOC ## getResolveScope ### Description Gets the scope in which this element is resolved. ### Method Signature open override fun getResolveScope(): GlobalSearchScope ``` -------------------------------- ### getReferences Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets all references associated with this element. ```APIDOC ## getReferences ### Description Gets all references associated with this element. ### Method Signature open override fun getReferences(): Array ``` -------------------------------- ### DetektCreateBaselineTask Constructor Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle/-detekt-create-baseline-task/index.html Initializes a new instance of the DetektCreateBaselineTask. ```APIDOC ## DetektCreateBaselineTask Constructor ### Description Initializes a new instance of the `DetektCreateBaselineTask` with the provided `WorkerExecutor` and `ProviderFactory`. ### Parameters - **workerExecutor** (`WorkerExecutor`) - The worker executor to use for background tasks. - **providers** (`ProviderFactory`) - The provider factory for creating configuration properties. ``` -------------------------------- ### DefaultConfigurationProvider.get Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-default-configuration-provider/index.html Retrieves the current configuration. ```APIDOC ## get ### Description Retrieves the current configuration. ### Signature ```kotlin abstract fun get(): Config ``` ``` -------------------------------- ### getProject Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the project associated with this element. ```APIDOC ## getProject ### Description Gets the project associated with this element. ### Method Signature open override fun getProject(): Project ``` -------------------------------- ### getPrevSibling Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the previous sibling of this element. ```APIDOC ## getPrevSibling ### Description Gets the previous sibling of this element. ### Method Signature open override fun getPrevSibling(): PsiElement ``` -------------------------------- ### instance() Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule-set-provider/instance.html This abstract function must be implemented to provide custom rule sets. ```APIDOC ## instance() ### Description This abstract function must be implemented to provide custom rule sets. ### Signature abstract fun instance(): RuleSet ``` -------------------------------- ### getPresentation Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the presentation information for this element. ```APIDOC ## getPresentation ### Description Gets the presentation information for this element. ### Method Signature open override fun getPresentation(): ItemPresentation? ``` -------------------------------- ### getNode Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the AST node for this element. ```APIDOC ## getNode ### Description Gets the AST node for this element. ### Method Signature open override fun getNode(): ASTNode ``` -------------------------------- ### DetektCompilerPluginReport Constructor Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.extensions/-detekt-compiler-plugin-report/index.html Initializes a new instance of the DetektCompilerPluginReport class. ```APIDOC ## DetektCompilerPluginReport Constructor ### Description Initializes a new instance of the DetektCompilerPluginReport class. ### Parameters #### Path Parameters - **name** (String) - Description of the name parameter. - **objects** (ObjectFactory) - Description of the objects parameter. ``` -------------------------------- ### getNextSibling Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the next sibling of this element. ```APIDOC ## getNextSibling ### Description Gets the next sibling of this element. ### Method Signature open override fun getNextSibling(): PsiElement ``` -------------------------------- ### visitInitializerList Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html Visits a list of initializers. ```APIDOC ## visitInitializerList ### Description Visits a list of initializers. ### Signature ```kotlin fun visitInitializerList(@NotNull list: KtInitializerList, data: Void?): Void? open fun visitInitializerList(@NotNull list: KtInitializerList) ``` ``` -------------------------------- ### getNavigationElement Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the navigation element for this element. ```APIDOC ## getNavigationElement ### Description Gets the navigation element for this element. ### Method Signature open override fun getNavigationElement(): PsiElement ``` -------------------------------- ### from Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-location/-companion/index.html Creates a Location from a PsiElement. If the element can't be determined, the KtFile with a character offset can be used. ```APIDOC ## from ### Description Creates a Location from a PsiElement. If the element can't be determined, the KtFile with a character offset can be used. ### Signature ```kotlin fun from(element: PsiElement, offset: Int = 0): Location ``` ### Parameters #### Path Parameters - **element** (PsiElement) - The PsiElement to create the Location from. - **offset** (Int) - The character offset within the file. Defaults to 0. ### Returns - **Location** - A new Location instance. ``` -------------------------------- ### load Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-default-configuration-provider/-companion/index.html Loads a DefaultConfigurationProvider with the given extensions specification and class loader. ```APIDOC ## load ### Description Loads a `DefaultConfigurationProvider` using the provided `ExtensionsSpec` and an optional `ClassLoader`. If no `ClassLoader` is specified, it defaults to the class loader of `DefaultConfigurationProvider`. ### Function Signature ```kotlin fun load(extensionsSpec: ExtensionsSpec, classLoader: ClassLoader = DefaultConfigurationProvider::class.java.classLoader): DefaultConfigurationProvider ``` ### Parameters * **extensionsSpec** (`ExtensionsSpec`) - Required - The specification for extensions to be loaded. * **classLoader** (`ClassLoader`) - Optional - The class loader to use for loading configurations. Defaults to `DefaultConfigurationProvider::class.java.classLoader`. ``` -------------------------------- ### getLastChild Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the last child of this element. ```APIDOC ## getLastChild ### Description Gets the last child of this element. ### Method Signature open override fun getLastChild(): PsiElement ``` -------------------------------- ### getFirstChild Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the first child of this element. ```APIDOC ## getFirstChild ### Description Gets the first child of this element. ### Method Signature open override fun getFirstChild(): PsiElement ``` -------------------------------- ### apply Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.plugin/-detekt-base-plugin/index.html Applies this plugin to the given project. ```APIDOC ## apply(project: Project) ### Description Applies this plugin to the given project. ### Method open override fun apply(project: Project) ``` -------------------------------- ### getContainingKtFile Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the containing KtFile of this element. ```APIDOC ## getContainingKtFile ### Description Gets the containing KtFile of this element. ### Method Signature open override fun getContainingKtFile(): KtFile ``` -------------------------------- ### visitKtFile Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html Visits a Kotlin file. ```APIDOC ## visitKtFile ### Description Visits a Kotlin file. ### Signature ```kotlin fun visitKtFile(@NotNull file: KtFile, data: Void?): Void? open fun visitKtFile(@NotNull file: KtFile) ``` ``` -------------------------------- ### getContainingFile Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the containing file of this element. ```APIDOC ## getContainingFile ### Description Gets the containing file of this element. ### Method Signature open override fun getContainingFile(): PsiFile ``` -------------------------------- ### KtElement.accept(visitor, data) Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/accept.html Accepts a visitor with associated data and returns a result. ```APIDOC ## accept(visitor: KtVisitor, data: D): R ### Description Accepts a visitor with associated data and returns a result. ### Method `open override fun accept(visitor: KtVisitor, data: D): R` ``` -------------------------------- ### getTextLength Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the length of the text content of this element. ```APIDOC ## getTextLength ### Description Gets the length of the text content of this element. ### Method Signature open override fun getTextLength(): Int ``` -------------------------------- ### getPsiOrParent Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the PsiElement or its parent if it's a KtElement. ```APIDOC ## getPsiOrParent ### Description Gets the PsiElement or its parent if it's a KtElement. ### Method Signature open override fun getPsiOrParent(): KtElement ``` -------------------------------- ### visitScriptInitializer Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html Visits a script initializer in the Kotlin AST. Overloaded to handle optional data. ```APIDOC ## visitScriptInitializer ### Description Visits a script initializer. ### Method open fun visitScriptInitializer(@NotNull initializer: KtScriptInitializer) ### Parameters - **initializer** (KtScriptInitializer) - Required - The script initializer to visit. ``` ```APIDOC ## visitScriptInitializer with data ### Description Visits a script initializer with associated data. ### Method open fun visitScriptInitializer(@NotNull initializer: KtScriptInitializer, data: Void?): Void? ### Parameters - **initializer** (KtScriptInitializer) - Required - The script initializer to visit. - **data** (Void?) - Optional - Associated data. ``` -------------------------------- ### DetektBasePlugin Constructor Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.plugin/-detekt-base-plugin/index.html Initializes a new instance of the DetektBasePlugin class. ```APIDOC ## DetektBasePlugin() ### Description Initializes a new instance of the DetektBasePlugin class. ### Constructor DetektBasePlugin() ``` -------------------------------- ### getOriginalElement Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the original element this element was derived from. ```APIDOC ## getOriginalElement ### Description Gets the original element this element was derived from. ### Method Signature open override fun getOriginalElement(): PsiElement ``` -------------------------------- ### DefaultConfigurationProvider Interface Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/index.html Provides default configuration settings for detekt. ```APIDOC interface DefaultConfigurationProvider ``` -------------------------------- ### getIcon Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the icon for this element with the specified flags. ```APIDOC ## getIcon ### Description Gets the icon for this element with the specified flags. ### Method Signature open override fun getIcon(p0: Int): Icon ``` -------------------------------- ### getUserData Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets user data associated with the specified key. ```APIDOC ## getUserData ### Description Gets user data associated with the specified key. ### Method Signature open override fun getUserData(p0: Key): T? ``` -------------------------------- ### load Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-detekt-provider/-companion/index.html Looks for a provider on the classpath which is able to load Detekt instances. ```APIDOC ## load ### Description Looks for a provider on the classpath which is able to load Detekt instances. ### Method fun load(classLoader: ClassLoader = DetektProvider::class.java.classLoader): DetektProvider ``` -------------------------------- ### getTextRange Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the text range of this element within its file. ```APIDOC ## getTextRange ### Description Gets the text range of this element within its file. ### Method Signature open override fun getTextRange(): TextRange ``` -------------------------------- ### register(key: String, value: Any) Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-properties-aware/register.html Binds a given value with a given key and stores it for later use. ```APIDOC ## register(key: String, value: Any) ### Description Binds a given value with a given key and stores it for later use. ### Method `abstract fun register(key: String, value: Any)` ### Parameters #### Path Parameters - **key** (String) - Required - The key to bind the value with. - **value** (Any) - Required - The value to be stored. ### Request Example ```kotlin propertiesAware.register("myKey", "myValue") ``` ### Response This method does not return a value. ``` -------------------------------- ### getTextOffset Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets the text offset of this element within its file. ```APIDOC ## getTextOffset ### Description Gets the text offset of this element within its file. ### Method Signature open override fun getTextOffset(): Int ``` -------------------------------- ### visitBinaryFile Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-detekt-visitor/index.html Visits a binary file in the AST. This method can be overridden to perform custom actions when a binary file is encountered. ```APIDOC ## visitBinaryFile ### Description Visits a binary file in the AST. ### Signature ```kotlin open fun visitBinaryFile(file: PsiBinaryFile) ``` ``` -------------------------------- ### getCopyableUserData Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Gets copyable user data associated with the specified key. ```APIDOC ## getCopyableUserData ### Description Gets copyable user data associated with the specified key. ### Method Signature open override fun getCopyableUserData(p0: Key): T? ``` -------------------------------- ### CompilerSpecBuilder Constructor Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-compiler-spec-builder/index.html Initializes a new instance of the CompilerSpecBuilder class. ```APIDOC ## CompilerSpecBuilder() ### Description Initializes a new instance of the CompilerSpecBuilder class. ### Constructor CompilerSpecBuilder() ``` -------------------------------- ### getPluginArtifact(): SubpluginArtifact Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.plugin/-detekt-kotlin-compiler-plugin/index.html Gets the artifact information for the Detekt compiler plugin. ```APIDOC ## getPluginArtifact() ### Description Returns the artifact for the compiler plugin. ### Method `getPluginArtifact(): SubpluginArtifact` ### Returns The SubpluginArtifact for the Detekt compiler plugin. ``` -------------------------------- ### Load VersionProvider Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-version-provider/-companion/load.html Loads the VersionProvider using the default classloader or a provided one. ```APIDOC ## load ### Description Loads the `VersionProvider` from the current classloader. ### Signature ```kotlin fun load(classLoader: ClassLoader = VersionProvider::class.java.classLoader): VersionProvider ``` ### Parameters * **classLoader** (`ClassLoader`) - Optional. The classloader to use for loading. Defaults to the classloader of `VersionProvider`. ``` -------------------------------- ### build Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-processing-spec-builder/index.html Builds the ProcessingSpec from the current configuration. ```APIDOC ## build ### Description Builds the ProcessingSpec from the current configuration. ### Function Signature `open override fun build(): ProcessingSpec` ### Returns - `ProcessingSpec` - The constructed processing specification. ``` -------------------------------- ### firstParameterOrNull Source: https://detekt.dev/kdoc/detekt-psi-utils/dev.detekt.psi/index.html Gets the first parameter symbol of a lambda expression within a KaSession. ```APIDOC ## firstParameterOrNull ### Description Gets the first parameter symbol of a lambda expression within a KaSession. ### Signature ```kotlin context(session: KaSession) fun KtLambdaExpression.firstParameterOrNull(): KaValueParameterSymbol? ``` ``` -------------------------------- ### Entity Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-issue/-entity/index.html Initializes a new instance of the Entity class with a signature and location. ```APIDOC ## Entity Constructor ### Description Initializes a new instance of the Entity class. ### Signature constructor(signature: String, location: Issue.Location) ``` -------------------------------- ### Create ValuesWithReason with List Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/values-with-reason.html Use this factory method to specify configuration values and their explanations from a list of ValueWithReason objects. This provides an alternative way to define complex configurations. ```kotlin fun valuesWithReason(values: List): ValuesWithReason ``` -------------------------------- ### visitKtFile Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-detekt-visitor/index.html Visits a Kotlin file. Overloaded versions are available for different contexts. ```APIDOC ## visitKtFile ### Description Visits a Kotlin file. ### Signature ```kotlin fun visitKtFile(file: KtFile, data: Void?): Void? open fun visitKtFile(file: KtFile) ``` ``` -------------------------------- ### TextLocation Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-text-location/index.html Initializes a new instance of the TextLocation class with specified start and end positions. ```APIDOC ## TextLocation constructor ### Description Initializes a new instance of the TextLocation class. ### Parameters #### Path Parameters - **start** (Int) - The starting character position. - **end** (Int) - The ending character position. ``` -------------------------------- ### VersionProvider Interface Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/index.html Provides information about the detekt version. ```APIDOC interface VersionProvider ``` -------------------------------- ### DefaultConfigurationProvider.copy Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-default-configuration-provider/index.html Copies the configuration to a specified target location. ```APIDOC ## copy ### Description Copies the configuration to a specified target location. ### Signature ```kotlin abstract fun copy(targetLocation: Path) ``` ### Parameters #### Path Parameters - **targetLocation** (Path) - The target location to copy the configuration to. ``` -------------------------------- ### visitFile Function Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/visit-file.html Initiates the visiting process for a KtFile. It performs a check to determine if the rule should be triggered and executes pre- and post-visit hooks before and after the visiting process. ```APIDOC ## visitFile ### Description Before starting visiting kotlin elements, a check is performed if this rule should be triggered. Pre- and post-visit-hooks are executed before/after the visiting process. ### Signature fun visitFile(root: KtFile, languageVersionSettings: LanguageVersionSettings): List ``` -------------------------------- ### Get All Analysis Modes Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-analysis-mode/values.html Retrieves an array containing all constants of the AnalysisMode enum. This can be useful for iteration or obtaining a list of all possible analysis modes. ```APIDOC ## values() ### Description Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants. ### Method `fun values(): Array` ### Returns An `Array` containing all enum constants. ``` -------------------------------- ### load Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-default-configuration-provider/-companion/load.html Loads the default configuration provider. It takes an ExtensionsSpec and an optional ClassLoader. If no ClassLoader is provided, it defaults to the class loader of DefaultConfigurationProvider. ```APIDOC ## load ### Description Loads the default configuration provider with specified extensions and class loader. ### Signature ```kotlin fun load(extensionsSpec: ExtensionsSpec, classLoader: ClassLoader = DefaultConfigurationProvider::class.java.classLoader): DefaultConfigurationProvider ``` ### Parameters * **extensionsSpec** (ExtensionsSpec) - Required - The specification for extensions to be loaded. * **classLoader** (ClassLoader) - Optional - The class loader to use for loading configurations. Defaults to `DefaultConfigurationProvider::class.java.classLoader`. ``` -------------------------------- ### from(elementToReport: PsiElement, elementForSignature: PsiElement) Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-entity/-companion/from.html Use this factory method if for reporting more detailed info is required than for signature. ```APIDOC ## from(elementToReport: PsiElement, elementForSignature: PsiElement) ### Description Use this factory method if for reporting more detailed info is required than for signature. ### Parameters #### Path Parameters - **elementToReport** (PsiElement) - Required - The PsiElement for reporting detailed information. - **elementForSignature** (PsiElement) - Required - The PsiElement to derive the signature from. ### Method Factory Function ``` -------------------------------- ### Get all DetektReportType enum values Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.extensions/-detekt-report-type/values.html The `values()` method returns an array containing all the constants of the `DetektReportType` enum. This can be useful for iterating over all possible report types. ```APIDOC ## values() ### Description Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants. ### Signature `fun values(): Array` ``` -------------------------------- ### accept Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Accepts a PsiElementVisitor to visit this element. Overloaded versions handle different visitor types and data. ```APIDOC ## accept ### Description Accepts a PsiElementVisitor to visit this element. Overloaded versions handle different visitor types and data. ### Method Signature open override fun accept(p0: PsiElementVisitor) open override fun accept(visitor: KtVisitor, data: D): R ``` -------------------------------- ### ExtensionsSpecBuilder.fromPaths Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-extensions-spec-builder/index.html Configures detekt extensions to be loaded from a collection of paths. ```APIDOC ## fromPaths ### Description Configures detekt to load extensions from the specified collection of file paths. ### Parameters #### Path Parameters - **paths** ( () -> Collection) - A lambda function that returns a collection of `Path` objects representing the locations of extensions. ### Function `fun fromPaths(paths: () -> Collection)` ``` -------------------------------- ### BaselineProvider Interface Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/index.html Provides access to baseline configurations. ```APIDOC interface BaselineProvider ``` -------------------------------- ### TextLocation Class Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/index.html The TextLocation class defines a range within a text file using start and end character positions. This is useful for pinpointing exact sections of text. ```APIDOC ## Class TextLocation ### Description Stores character start and end positions of a text file. ### Properties - `start` (Int) - The starting character position. - `end` (Int) - The ending character position. ``` -------------------------------- ### DetektReportType Functions Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.extensions/-detekt-report-type/index.html The DetektReportType enum provides functions to retrieve an enum constant by its name using 'valueOf(value: String)' and to get all enum constants as an array using 'values()'. ```APIDOC fun valueOf(value: String): DetektReportType fun values(): Array ``` -------------------------------- ### BaselineSpecBuilder Constructor Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-baseline-spec-builder/index.html Initializes a new instance of the BaselineSpecBuilder class. ```APIDOC ## BaselineSpecBuilder() ### Description Initializes a new instance of the BaselineSpecBuilder class. ### Constructor `BaselineSpecBuilder()` ``` -------------------------------- ### run(files: Collection) Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-detekt/index.html Runs the detekt analysis on a specific collection of KtFile objects. ```APIDOC ## run(files: Collection) ### Description Runs the detekt analysis on a specific collection of KtFile objects. ### Signature abstract fun run(files: Collection): AnalysisResult ``` -------------------------------- ### LoggingSpecBuilder Constructor Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-logging-spec-builder/index.html Initializes a new instance of the LoggingSpecBuilder class. ```APIDOC ## LoggingSpecBuilder() ### Description Constructs a new LoggingSpecBuilder. ### Constructor LoggingSpecBuilder() ``` -------------------------------- ### AnalysisMode.full Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-analysis-mode/index.html Allows rules to analyze the PSI & AST of files and also use additional information from the compiler like types, symbols and smart casts. light mode is faster but rules that use additional compiler information will not run. ```APIDOC ## AnalysisMode.full Allows rules to analyse the PSI & AST of files and also use additional information from the compiler like types, symbols and smart casts. light mode is faster but rules that use additional compiler information will not run. ``` -------------------------------- ### Create ValuesWithReason with Pairs Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/values-with-reason.html Use this factory method to specify configuration values and their explanations as pairs. This is useful for defining rules with specific import configurations. ```kotlin fun valuesWithReason(vararg values: Pair): ValuesWithReason ``` ```kotlin @Configuration("imports which should not be used") private val imports: ValuesWithReason by config( valuesWithReason("org.junit.Test" to "Do not use Junit4. Use org.junit.jupiter.api.Test instead.") ) ``` -------------------------------- ### ValueWithReason Class Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/index.html A ValueWithReason object pairs a configuration value (String) with an optional explanation (String) for its usage. This is useful for providing context to configuration settings. ```APIDOC ## Class ValueWithReason ### Description A ValueWithReason represents a single configuration value that may have an explanation as to why it is used. ### Properties - `value` (String) - The configuration value. - `reason` (String?) - An optional explanation for the value. ``` -------------------------------- ### DetektCreateBaselineTask Task Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle/index.html Task for creating a baseline file for Detekt. ```APIDOC ## DetektCreateBaselineTask Task ### Description Task responsible for generating a baseline file for Detekt. ### Class Signature ```kotlin @CacheableTask abstract class DetektCreateBaselineTask @Inject constructor( workerExecutor: WorkerExecutor, providers: ProviderFactory) : SourceTask ``` ``` -------------------------------- ### SourceLocation.compareTo Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-source-location/index.html Compares this SourceLocation instance with another SourceLocation instance for ordering. ```APIDOC ## `compareTo` ### Description Compares this `SourceLocation` with another `SourceLocation`. ### Signature open operator override fun compareTo(other: SourceLocation): Int ``` -------------------------------- ### load Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-baseline-provider/-companion/index.html Loads a BaselineProvider instance. It can optionally take a ClassLoader to specify where to load the provider from. ```APIDOC ## load ### Description Loads a BaselineProvider instance. It can optionally take a ClassLoader to specify where to load the provider from. ### Signature ```kotlin fun load(classLoader: ClassLoader = BaselineProvider::class.java.classLoader): BaselineProvider ``` ### Parameters * **classLoader** (ClassLoader) - Optional. The ClassLoader to use for loading the provider. Defaults to the ClassLoader of BaselineProvider. ``` -------------------------------- ### ExtensionsSpecBuilder.fromClassloader Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-extensions-spec-builder/index.html Configures detekt extensions to be loaded from a provided ClassLoader. ```APIDOC ## fromClassloader ### Description Configures detekt to load extensions using the provided ClassLoader. ### Parameters #### Path Parameters - **classLoader** ( () -> ClassLoader) - A lambda function that returns the ClassLoader to use for loading extensions. ### Function `fun fromClassloader(classLoader: () -> ClassLoader)` ``` -------------------------------- ### BaselineSpecBuilder build() Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-baseline-spec-builder/index.html Builds the BaselineSpec instance based on the configured properties. ```APIDOC ## build() ### Description Builds and returns a `BaselineSpec` object configured with the specified path and creation behavior. ### Function Signature `open override fun build(): BaselineSpec` ``` -------------------------------- ### Entity Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-entity/index.html Constructs a new Entity with the given signature, location, and KtElement. ```APIDOC ## Entity Constructor ### Description Initializes a new instance of the `Entity` class. ### Parameters - **signature** (String) - The unique signature of the code fragment. - **location** (Location) - The location of the code fragment in the source file. - **ktElement** (KtElement) - The KtElement associated with the code fragment. ``` -------------------------------- ### SourceLocation Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-source-location/index.html Initializes a new instance of the SourceLocation class with the specified line and column numbers. ```APIDOC ## Constructor ### Description Initializes a new instance of the `SourceLocation` class. ### Signature constructor(line: Int, column: Int) ``` -------------------------------- ### RuleInstance Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule-instance/-rule-instance.html Constructs a new RuleInstance. ```APIDOC ## RuleInstance Constructor ### Description Initializes a new instance of the `RuleInstance` class. ### Parameters - **id** (String) - The unique identifier for the rule. - **ruleSetId** (RuleSetId) - The identifier of the rule set this rule belongs to. - **url** (URI?) - An optional URI pointing to more information about the rule. - **description** (String) - A detailed description of the rule's purpose. - **severity** (Severity) - The severity level of the rule. - **active** (Boolean) - Indicates whether the rule is currently active. ``` -------------------------------- ### Load VersionProvider Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-version-provider/-companion/index.html Loads a VersionProvider instance. It can optionally take a ClassLoader to specify where to load the provider from. If no ClassLoader is provided, it defaults to the ClassLoader of the VersionProvider class. ```APIDOC ## load ### Description Loads a VersionProvider instance. ### Signature ```kotlin fun load(classLoader: ClassLoader = VersionProvider::class.java.classLoader): VersionProvider ``` ### Parameters * `classLoader` (ClassLoader) - Optional. The ClassLoader to use for loading the VersionProvider. Defaults to `VersionProvider::class.java.classLoader`. ``` -------------------------------- ### navigate Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Navigates to this element. ```APIDOC ## navigate ### Description Navigates to this element. ### Method Signature open override fun navigate(p0: Boolean) ``` -------------------------------- ### RuleInstance Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule-instance/index.html Initializes a new instance of the RuleInstance class. ```APIDOC ## RuleInstance Constructor ### Description Initializes a new instance of the RuleInstance class with the provided details. ### Parameters - **id** (String) - The unique identifier for the rule. - **ruleSetId** (RuleSetId) - The identifier of the rule set this rule belongs to. - **url** (URI?) - An optional URI pointing to the rule's documentation or source. - **description** (String) - A detailed description of the rule's purpose. - **severity** (Severity) - The severity level of the rule. - **active** (Boolean) - Indicates whether the rule is currently active. ``` -------------------------------- ### project Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-processing-spec-builder/index.html Configures the project specification for detekt. ```APIDOC ## project ### Description Configures the project specification for detekt. ### Function Signature `fun project(init: ProjectSpecBuilder.() -> Unit)` ### Parameters - `init` (ProjectSpecBuilder.() -> Unit) - A lambda function to configure the ProjectSpecBuilder. ``` -------------------------------- ### load Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-detekt-cli/-companion/index.html Loads the DetektCli instance. It can optionally accept a ClassLoader. ```APIDOC ## load ### Description Loads the DetektCli instance. It can optionally accept a ClassLoader. ### Signature ```kotlin fun load(classLoader: ClassLoader = DetektCli::class.java.classLoader): DetektCli ``` ### Parameters * **classLoader** (ClassLoader) - Optional - The ClassLoader to use for loading DetektCli. Defaults to the class loader of DetektCli. ``` -------------------------------- ### applyToCompilation(kotlinCompilation: KotlinCompilation<*>) : Provider> Source: https://detekt.dev/kdoc/detekt-gradle-plugin/dev.detekt.gradle.plugin/-detekt-kotlin-compiler-plugin/index.html Applies the Detekt plugin to a specific Kotlin compilation, returning a provider for subplugin options. ```APIDOC ## applyToCompilation(kotlinCompilation: KotlinCompilation<*>) : Provider> ### Description Applies this plugin to the given Kotlin compilation. ### Method `applyToCompilation(kotlinCompilation: KotlinCompilation<*>): Provider>` ### Parameters - **kotlinCompilation** (KotlinCompilation<*>) - The Kotlin compilation to apply the plugin to. ### Returns A Provider for a list of SubpluginOption. ``` -------------------------------- ### ExtensionsSpecBuilder Constructor Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/-extensions-spec-builder/index.html Initializes a new instance of the ExtensionsSpecBuilder class. ```APIDOC ## ExtensionsSpecBuilder() ### Description Initializes a new instance of the ExtensionsSpecBuilder class. ### Constructor `ExtensionsSpecBuilder()` ``` -------------------------------- ### StringPrintStream Constructor Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils/-string-print-stream/index.html Initializes a new instance of the StringPrintStream class. ```APIDOC ## StringPrintStream() ### Description Constructs a new StringPrintStream. ### Constructor StringPrintStream() ``` -------------------------------- ### subConfigKeys() Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-config/sub-config-keys.html Retrieves all available sub-configuration keys from the current configuration. ```APIDOC ## subConfigKeys() ### Description Returns a set of all sub configuration keys. ### Signature abstract fun subConfigKeys(): Set ``` -------------------------------- ### CompilerSpecBuilder Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/index.html A builder for creating `CompilerSpec` configurations. ```APIDOC ## CompilerSpecBuilder ### Description Provides a fluent API to configure the `CompilerSpec`. ### Class `CompilerSpecBuilder` ### Inherits `Builder` ``` -------------------------------- ### navigate Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-psi-file/index.html Navigates to the PSI file. This method is typically used for testing navigation logic. ```APIDOC ## navigate ### Description Navigates to the PSI file. This method is typically used for testing navigation logic. ### Method `open override fun navigate(p0: Boolean)` ``` -------------------------------- ### Rule Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html The constructor for the Rule class. It initializes a rule with its configuration, a description, and an optional documentation URL. ```APIDOC ## Rule Constructor ### Description Initializes a new instance of the `Rule` class. ### Parameters * **config** (Config) - Required - The configuration object for the rule. * **description** (String) - Required - A description of what the rule checks for. * **url** (URI?) - Optional - An optional URI pointing to the documentation for this rule. ``` -------------------------------- ### useDefaultConfig Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api.spec/-config-spec/use-default-config.html Rely on detekt to configure meaningful defaults. Additional configuration overwrites single properties of the default file. ```APIDOC ## useDefaultConfig abstract val useDefaultConfig: Boolean Rely on detekt to configure meaningful defaults. Additional configuration overwrite single properties of the default file. ``` -------------------------------- ### Detektion Constructor Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-detektion/index.html Initializes a new instance of the Detektion class with a list of issues and rules. ```APIDOC ## Constructor Detektion ### Description Initializes a new instance of the Detektion class. ### Parameters * **issues** (List) - A list of issues found. * **rules** (List) - A list of rule instances applied. ``` -------------------------------- ### BaselineSpecBuilder Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.dsl/index.html A builder for creating `BaselineSpec` configurations. ```APIDOC ## BaselineSpecBuilder ### Description Provides a fluent API to configure the `BaselineSpec`. ### Class `BaselineSpecBuilder` ### Inherits `Builder` ``` -------------------------------- ### visitKtCommonFile Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-detekt-visitor/index.html Visits a common Kotlin file element. ```APIDOC ## visitKtCommonFile ### Description Visits a common Kotlin file element. ### Signature ```kotlin fun visitKtCommonFile(file: KtCommonFile): Void? ``` ``` -------------------------------- ### ValueWithReason toConfig Function Source: https://detekt.dev/kdoc/detekt-test/dev.detekt.test/index.html Converts a `ValueWithReason` object into a `Map` configuration format. ```APIDOC ## fun ValueWithReason.toConfig(): Map ### Description Converts a `ValueWithReason` object into a `Map` configuration format. ### Returns A map representing the configuration. ``` -------------------------------- ### FakeKtElement Constructor Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-kt-element/index.html Initializes a new instance of the FakeKtElement class. It can optionally be provided with a FakePsiFile. ```APIDOC ## FakeKtElement Constructor ### Description Initializes a new instance of the FakeKtElement class. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val fakeElement = FakeKtElement() val fakeElementWithFile = FakeKtElement(FakePsiFile("some content")) ``` ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Load BaselineProvider Source: https://detekt.dev/kdoc/detekt-tooling/dev.detekt.tooling.api/-baseline-provider/-companion/load.html Loads a BaselineProvider instance. Optionally, a custom ClassLoader can be provided to specify how classes should be loaded. ```APIDOC ## load ### Description Loads a `BaselineProvider` instance. Optionally, a custom `ClassLoader` can be provided to specify how classes should be loaded. ### Signature ```kotlin fun load(classLoader: ClassLoader = BaselineProvider::class.java.classLoader): BaselineProvider ``` ### Parameters * **classLoader** (`ClassLoader`) - Optional. The `ClassLoader` to use for loading classes. Defaults to the class loader of `BaselineProvider`. ``` -------------------------------- ### from(element: PsiElement, offset: Int = 0) Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-entity/-companion/from.html Factory function which retrieves all needed information from the PsiElement itself. Defaults to offset 0. ```APIDOC ## from(element: PsiElement, offset: Int = 0) ### Description Factory function which retrieves all needed information from the PsiElement itself. ### Parameters #### Path Parameters - **element** (PsiElement) - Required - The PsiElement to create the Entity from. - **offset** (Int) - Optional - The offset within the PsiElement. Defaults to 0. ### Method Factory Function ``` -------------------------------- ### FakePsiFile Constructor Source: https://detekt.dev/kdoc/detekt-test-utils/dev.detekt.test.utils.internal/-fake-psi-file/index.html Constructs a new FakePsiFile with optional text content and a name. This is useful for creating mock PSI files for testing. ```APIDOC ## FakePsiFile Constructor ### Description Constructs a new FakePsiFile with optional text content and a name. This is useful for creating mock PSI files for testing. ### Signature constructor(text: String = "", name: String = "") ``` -------------------------------- ### visitScript Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/-rule/index.html Visits a script in the Kotlin AST. Overloaded to handle optional data. ```APIDOC ## visitScript ### Description Visits a script. ### Method open fun visitScript(@NotNull script: KtScript) ### Parameters - **script** (KtScript) - Required - The script to visit. ``` ```APIDOC ## visitScript with data ### Description Visits a script with associated data. ### Method fun visitScript(@NotNull script: KtScript, data: Void?): Void? ### Parameters - **script** (KtScript) - Required - The script to visit. - **data** (Void?) - Optional - Associated data. ``` -------------------------------- ### valuesWithReason(values: List) Source: https://detekt.dev/kdoc/detekt-api/dev.detekt.api/values-with-reason.html This factory method allows rule authors to specify a list of configuration values, each with an associated explanation. It is intended for use with the `config` property delegate. ```APIDOC ## valuesWithReason(values: List) ### Description Factory method to specify a list of configuration values, each with an explanation. Designed for use by rule authors with the `config` property delegate. ### Signature ```kotlin fun valuesWithReason(values: List): ValuesWithReason ``` ### Note The `config` property delegate only supports these factory methods when defining `ValuesWithReason`. ```