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

File 'C\...\.idea' specified for property 'ideaExtension.path' is not a file. #2172

Closed
chriskn opened this issue Dec 9, 2019 · 7 comments
Closed
Assignees
Milestone

Comments

@chriskn
Copy link

chriskn commented Dec 9, 2019

Expected Behavior

Folders should recognized as valid input for ideaExtension.path on Windows

Observed Behavior

Even if the specified folder is valid, detekt failes. Reason is that it want's a file were a folder is needed.

Steps to Reproduce

Configure detekt gradle plugin on a windows machine.

    detekt {
        toolVersion = "1.2.2"
        buildUponDefaultConfig= true
        idea {
            path = "$project.rootDir/.idea"
            codeStyleScheme = "$project.rootDir/config/codestyleConfig.xml"
            inspectionsProfile = "$project.rootDir/config/inspectConfig.xml"
            report = "$project.rootDir/build/detekt/report"
            mask = "*.kt"
        }
}

This configuration (plus the usual plugin and dependencies) Will fail with the message described in the title.

Your Environment

  • Version of detekt used: 1.2.2
  • Version of Gradle used (if applicable): 6.0.1
  • Operating System and version: Windows 10
@chriskn
Copy link
Author

chriskn commented Dec 9, 2019

Suggestion: Use InputDirectory instead InputFile in https://github.com/arturbosch/detekt/blob/ffbd6e119105f6e07d686bc5632f7b531bf91a59/detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/extensions/IdeaExtension.kt#L14

See https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/InputDirectory.html

@Kaelten
Copy link

Kaelten commented Jan 7, 2020

with this bug you can't run either detektIdeaFormat or detektIdeaInspect

@JoeGaebel
Copy link

@3flex, I would suggest this as a bug, as opposed to improvement.

@3flex 3flex added bug and removed improvement labels Jan 8, 2020
@dotdevio
Copy link

+1 for this issue.

@arturbosch arturbosch self-assigned this Jan 28, 2020
@afaucogney
Copy link

Is there a workarround, because there are not so many +1. Does people are using this feature ?

@arturbosch
Copy link
Member

The workaround is to use the inspect.sh and format.sh scripts from the IntelliJ installation yourself.
detekt just provides Gradle wrapper tasks for them.

Does people are using this feature ?

Not many I'm afraid as this feaure must have been broken for a long time now.
I've worked on a fix for this. Just need to find time to commit everything.

@adamschoenemann
Copy link

+1

@arturbosch arturbosch added this to the 1.10.0 milestone May 18, 2020
arturbosch added a commit that referenced this issue May 18, 2020
Task wrapper over inspect.sh hangs for some hours and wrapper task over format.sh crashes with "container already disposed" messages
arturbosch added a commit that referenced this issue May 18, 2020
* Reimplement local idea integration - #2172

* Remove idea integration - #2172

Task wrapper over inspect.sh hangs for some hours and wrapper task over format.sh crashes with "container already disposed" messages

* Remove unused project property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants