-
Notifications
You must be signed in to change notification settings - Fork 0
Add Detekt configuration #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * Copyright 2026, TeamDev. All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Redistribution and use in source and/or binary forms, with or without | ||
| * modification, must retain the above copyright notice and the following | ||
| * disclaimer. | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
|
|
||
| package io.spine.embedcode.gradle.dependency | ||
|
|
||
| /** | ||
| * Detekt static-analysis plugin used by JVM modules. | ||
| */ | ||
| object Detekt { | ||
|
|
||
| // The alpha version is used, because latest stable version doesn't support JDK 25. | ||
| const val version = "2.0.0-alpha.5" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" ?> | ||
| <SmellBaseline> | ||
| <ManuallySuppressedIssues/> | ||
| <CurrentIssues> | ||
| <ID>LongMethod:EmbedCodePlugin.kt:EmbedCodePlugin$override fun apply</ID> | ||
| <ID>LongMethod:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$@TaskAction public fun install</ID> | ||
| <ID>MagicNumber:InstallEmbedCodeTask.kt:InstallEmbedCodeTask.Companion$200</ID> | ||
| <ID>MagicNumber:InstallEmbedCodeTask.kt:InstallEmbedCodeTask.Companion$299</ID> | ||
| <ID>ReturnCount:Checksum.kt:internal fun githubReleaseApi: URI?</ID> | ||
| <ID>ReturnCount:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$@TaskAction public fun install</ID> | ||
| <ID>ReturnCount:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$private fun installFromVerifiedAsset: Boolean</ID> | ||
| <ID>ReturnCount:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$private fun isLocallyVerifiedExecutable: Boolean</ID> | ||
| <ID>ReturnCount:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$private fun isPreviouslyVerifiedInstallation: Boolean</ID> | ||
| <ID>ThrowsCount:Checksum.kt:internal fun parseGitHubAssetSha256: String</ID> | ||
| <ID>ThrowsCount:EmbedCodeVersion.kt:internal fun validateVersion: String</ID> | ||
| <ID>ThrowsCount:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$@TaskAction public fun install</ID> | ||
| <ID>ThrowsCount:InstallEmbedCodeTask.kt:InstallEmbedCodeTask.Companion$fun createDirectoriesSafely</ID> | ||
| <ID>TooManyFunctions:InstallEmbedCodeTask.kt:InstallEmbedCodeTask$Companion</ID> | ||
| </CurrentIssues> | ||
| </SmellBaseline> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| naming: | ||
| ClassNaming: | ||
| excludes: &testFiles | ||
| - "**/*Test.kt" | ||
| - "**/*Spec.kt" | ||
| MatchingDeclarationName: | ||
| excludes: *testFiles | ||
| FunctionNaming: | ||
| excludes: *testFiles | ||
|
|
||
| style: | ||
| UnusedPrivateFunction: | ||
| allowedNames: '(_|ignored|expected|serialVersionUID|about|ABOUT)' | ||
| UnusedPrivateProperty: | ||
| allowedNames: '(_|ignored|expected|serialVersionUID|about|ABOUT)' | ||
| MagicNumber: | ||
| excludes: *testFiles | ||
| ignoreNumbers: | ||
| - '-1' | ||
| - '0' | ||
| - '1' | ||
| - '2' | ||
| - '3' | ||
| MaxLineLength: | ||
| maxLineLength: 100 | ||
| excludeCommentStatements: true | ||
| ForbiddenComment: | ||
| allowedPatterns: 'TODO:' | ||
|
|
||
| complexity: | ||
| LargeClass: | ||
| excludes: *testFiles | ||
| TooManyFunctions: | ||
| excludes: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit (consistency): |
||
| - '**/*Test.kt' | ||
| - '**/*Spec.kt' | ||
| LongMethod: | ||
| excludes: *testFiles | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit (wording, optional): "because latest stable version doesn't support JDK 25" reads more naturally as "because the latest stable version does not support JDK 25" (add the article; the Spine writing style also tends to avoid contractions in doc prose).