Skip to content
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

bug: toggleOnOff() switch not skipping code in extended JpaRepository interface #1758

Open
mtyminsky opened this issue Oct 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mtyminsky
Copy link

Describe the bug

toggleOnOff() switch not skipping code in extendig JpaRepository interface
example below, but I changed some details because it is a fragment of code from work project.

Expected behavior

should skip fragment of code

Observed behavior

not skipping fragment of code

Steps to Reproduce

package here.is.a.package

import org.springframework.data.jpa.repository.JpaRepository

/** repository */
interface CustomRepo : JpaRepository<Custom, EntityId> {

    /**
     * some description
     *
     * @param param1
     * @param param2
     * @return boolean
     */
    // spotless:off
    fun existsByUserIdAndUserProfileId(param1: EntityId, param2: CustomId): Boolean
    // spotless:on
}
spotless {
    format("misc") {
        target("*.md", ".gitignore")

        trimTrailingWhitespace()
        indentWithTabs()
        endWithNewline()
    }
    kotlin {
        ktfmt().kotlinlangStyle()
        diktat().configFile("${projectDir}/diktat-analysis.yml")
        toggleOffOn()
    }
}

Environment information

  • diktat version: gradle-spotless-plugin 6.20.0
  • build tool (maven/gradle): Gradle
  • how is diktat run (CLI, plugin, etc.): via gradle task
  • kotlin version: 1.8.22
  • operating system: Windows 11 (WSL2 - Ubuntu 22.04.3 LTS (GNU/Linux 5.15.123.1-microsoft-standard-WSL2 x86_64)
  • link to a project (if your project is public): not public
@mtyminsky mtyminsky added the bug Something isn't working label Oct 4, 2023
@mtyminsky mtyminsky changed the title bug: toggleOnOff() switch not skipping code in extendig JpaRepository interface bug: toggleOnOff() switch not skipping code in extended JpaRepository interface Oct 4, 2023
@nulls
Copy link
Member

nulls commented Oct 5, 2023

Hi @mtyminsky, thanks for reporting the issue. We will look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants