From 0644b59d8eb62fa6891c90f04cc0bfc83d73518a Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 19 May 2022 09:25:53 +0200 Subject: [PATCH] Example implementation: invoke `TODO()` only if not CI --- .../plugins/template/listeners/MyProjectManagerListener.kt | 3 ++- .../plugins/template/services/MyApplicationService.kt | 4 +++- .../jetbrains/plugins/template/services/MyProjectService.kt | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/jetbrains/plugins/template/listeners/MyProjectManagerListener.kt b/src/main/kotlin/org/jetbrains/plugins/template/listeners/MyProjectManagerListener.kt index 4c21e6d..40bcf15 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/listeners/MyProjectManagerListener.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/listeners/MyProjectManagerListener.kt @@ -10,6 +10,7 @@ internal class MyProjectManagerListener : ProjectManagerListener { override fun projectOpened(project: Project) { project.service() - TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") + System.getenv("CI") + ?: TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") } } diff --git a/src/main/kotlin/org/jetbrains/plugins/template/services/MyApplicationService.kt b/src/main/kotlin/org/jetbrains/plugins/template/services/MyApplicationService.kt index f511a21..59354fa 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/services/MyApplicationService.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/services/MyApplicationService.kt @@ -7,6 +7,8 @@ class MyApplicationService { init { println(MyBundle.message("applicationService")) - TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") + System.getenv("CI") + ?: TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") + } } diff --git a/src/main/kotlin/org/jetbrains/plugins/template/services/MyProjectService.kt b/src/main/kotlin/org/jetbrains/plugins/template/services/MyProjectService.kt index b152085..175818d 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/services/MyProjectService.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/services/MyProjectService.kt @@ -8,6 +8,7 @@ class MyProjectService(project: Project) { init { println(MyBundle.message("projectService", project.name)) - TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") + System.getenv("CI") + ?: TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") } }