diff --git a/.github/workflows/quality-check.yaml b/.github/workflows/quality-check.yaml index 24ef6a32..35e9b59c 100644 --- a/.github/workflows/quality-check.yaml +++ b/.github/workflows/quality-check.yaml @@ -120,7 +120,7 @@ jobs: sudo apt install -y docker docker-compose - name: Run Test Suite run: | - ./gradlew --console=plain "clean" "cleanTest" "unitTest" + ./gradlew --stacktrace --console=plain "clean" "cleanTest" "unitTest" - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: success() || failure() # always run even if the previous step fails diff --git a/gradle/diktat.yml b/gradle/diktat.yml index 625c70e9..eca884eb 100644 --- a/gradle/diktat.yml +++ b/gradle/diktat.yml @@ -1,24 +1,26 @@ -- name: MISSING_KDOC_CLASS_ELEMENTS +- name: MISSING_KDOC_CLASS_ELEMENTS # Allow having class where fields don't have kdoc enabled: false -- name: MISSING_KDOC_ON_FUNCTION +- name: MISSING_KDOC_ON_FUNCTION # Allow functions to not have kdoc (too noisy comments) enabled: false -- name: GENERIC_VARIABLE_WRONG_DECLARATION +- name: GENERIC_VARIABLE_WRONG_DECLARATION # Allow generics without boundaries enabled: false -- name: FILE_WILDCARD_IMPORTS +- name: FILE_WILDCARD_IMPORTS # Allow wildcard imports (like java.util.*) enabled: false -- name: TOO_LONG_FUNCTION - enabled: false -- name: KDOC_NO_EMPTY_TAGS +- name: TOO_LONG_FUNCTION # Allow long-ish functions, sometimes they are convenient + enabled: true + configuration: + maxFunctionLength: 50 +- name: KDOC_NO_EMPTY_TAGS # Allow kdocs without specifying obvious parameters. enabled: false -- name: WRONG_INDENTATION +- name: WRONG_INDENTATION # Indentation is managed by intellij enabled: false -- name: MAGIC_NUMBER +- name: MAGIC_NUMBER # Allow magic numbers on array access and ports enabled: false -- name: TOO_MANY_PARAMETERS +- name: TOO_MANY_PARAMETERS # Allow at least 10 parameters (some signatures can be complex when working with intellij) enabled: true configuration: maxParameterListSize: '10' -- name: FILE_NAME_INCORRECT +- name: FILE_NAME_INCORRECT # File name does not need to match class name inside enabled: false -- name: LOCAL_VARIABLE_EARLY_DECLARATION +- name: LOCAL_VARIABLE_EARLY_DECLARATION # Allow declaring variables at the beginning of a function if they are mutable enabled: false \ No newline at end of file diff --git a/packages/mongodb-access-adapter/datagrip-access-adapter/src/test/kotlin/com/mongodb/jbplugin/accessadapter/datagrip/IntegrationTest.kt b/packages/mongodb-access-adapter/datagrip-access-adapter/src/test/kotlin/com/mongodb/jbplugin/accessadapter/datagrip/IntegrationTest.kt index 3b3537dc..f679dec0 100644 --- a/packages/mongodb-access-adapter/datagrip-access-adapter/src/test/kotlin/com/mongodb/jbplugin/accessadapter/datagrip/IntegrationTest.kt +++ b/packages/mongodb-access-adapter/datagrip-access-adapter/src/test/kotlin/com/mongodb/jbplugin/accessadapter/datagrip/IntegrationTest.kt @@ -17,6 +17,7 @@ import com.intellij.openapi.application.ModalityState import com.intellij.openapi.progress.EmptyProgressIndicator import com.intellij.openapi.project.Project import com.intellij.openapi.project.ProjectManager +import com.intellij.openapi.util.Disposer import com.intellij.testFramework.junit5.RunInEdt import com.intellij.testFramework.junit5.TestApplication import com.intellij.util.ui.EDT @@ -84,6 +85,7 @@ internal class IntegrationTestExtension : BeforeAllCallback, ProjectUtil.openOrCreateProject(testClassName, Files.createTempDirectory(testClassName))!! } + Disposer.register(ApplicationManager.getApplication(), project) context.getStore(namespace).put(projectKey, project) val dataSource = runBlocking {