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

Feature/103 error message if companion gradle plugin for mutation mate is missing #133

Conversation

nikomall34
Copy link
Contributor

I added a groovy and a kotlin parsers to parse the build files. When the project is opened the parsers are triggered and check if the pitest and the companion plugin are missing. Right now if a project contains the build.gradle and the build.gradle.kts file two error messages will appear (You have to close the first error messages to see the second one).

IMPORTANT: I changed the intellij version to 2023.1. So in order to test it you should clean the project by deleting the .idea, .gradle and build folders. These folders should be deleted in the plugin project and every project you want to open with the intellij idea that runs in the sandbox.

For testing I could only test the groovy parser because the implementation does not rely on intellij. So for the kotlin parsers I tried to mock the intellij project environment with classes from com.intellij.testFramework. But this didn't work for me. The Problem is that we are using Junit5 and I couldn't find a workaround.

In order to test it and see a message you can take the test build scripts rename them to "build.gradle" or "build.gradle.kts" and open a Project in the Intellij Idea Sandbox instance.

Copy link
Contributor

@lheimbs lheimbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works and on my machine except for plugin definitions that are commented out but that could be handled in a future Issue.

Personally I dont like the invasive error message as a popup that has to be dismissed.
As a plugin this seems too overbearing to me, where a simple notification should've sufficed...
Leave it like this but we should discuss what others would prefer.

The change request is aimed at the smallish review comments.
Plus please remove any unneeded stuff that is not required for the tests from the test gradle build files.

nikomall34 and others added 4 commits December 13, 2023 10:43
…r-MutationMate-is-missing' of github.com:amosproj/amos2023ws02-pitest-ide-plugin into Feature/103-Error-message-if-companion-Gradle-plugin-for-MutationMate-is-missing
@nikomall34
Copy link
Contributor Author

@lheimbs about the test files. I kept everything in the build files since the whole file is parsed. So I it is good to see in case there are some sections the parser cannot handle. Or what do you mean with unneeded stuff?

@nikomall34 nikomall34 merged commit 32f79ed into main Dec 13, 2023
16 checks passed
@nikomall34 nikomall34 deleted the Feature/103-Error-message-if-companion-Gradle-plugin-for-MutationMate-is-missing branch December 13, 2023 09:58
@nikomall34 nikomall34 restored the Feature/103-Error-message-if-companion-Gradle-plugin-for-MutationMate-is-missing branch December 13, 2023 13:27
@nikomall34 nikomall34 deleted the Feature/103-Error-message-if-companion-Gradle-plugin-for-MutationMate-is-missing branch December 13, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants