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

ISE: "No runnable rules found. Please ensure that at least one is enabled" when running smoke tests during the release procedure #1478

Closed
0x6675636b796f75676974687562 opened this issue Jul 26, 2022 · 0 comments · Fixed by #1479, #1481 or #1482
Assignees
Labels
bug Something isn't working
Milestone

Comments

@0x6675636b796f75676974687562
Copy link
Member

0x6675636b796f75676974687562 commented Jul 26, 2022

Whenever DiktatSaveSmokeTest is run during the release process, the following command is executed during each test:

java -jar ktlint -R diktat.jar --disabled_rules=standard -F /tmp/FixPlugin--899173061/src/main/kotlin/DefaultPackageTest.kt

The command fails with

java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No runnable rules found. Please ensure that at least one is enabled.
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at com.pinterest.ktlint.internal.KtlintCommandLine.parallel(KtlintCommandLine.kt:578)
	at com.pinterest.ktlint.internal.KtlintCommandLine.parallel$default(KtlintCommandLine.kt:536)
	at com.pinterest.ktlint.internal.KtlintCommandLine.lintFiles(KtlintCommandLine.kt:283)
	at com.pinterest.ktlint.internal.KtlintCommandLine.run(KtlintCommandLine.kt:235)
	at com.pinterest.ktlint.Main.main(Main.kt:31)
Caused by: java.lang.IllegalStateException: No runnable rules found. Please ensure that at least one is enabled.
	at com.pinterest.ktlint.core.internal.RuleSorter.applyRunAfterRuleToRuleExecutionOrder(RuleSorter.kt:184)
	at com.pinterest.ktlint.core.internal.RuleSorter.getSortedRules(RuleSorter.kt:40)
	at com.pinterest.ktlint.core.internal.VisitorProvider.<init>(VisitorProvider.kt:35)
	at com.pinterest.ktlint.core.internal.VisitorProvider.<init>(VisitorProvider.kt:17)
	at com.pinterest.ktlint.core.KtLint.format(KtLint.kt:239)
	at com.pinterest.ktlint.internal.FileUtilsKt.formatFile(FileUtils.kt:202)
	at com.pinterest.ktlint.internal.KtlintCommandLine.process(KtlintCommandLine.kt:355)
	at com.pinterest.ktlint.internal.KtlintCommandLine.access$process(KtlintCommandLine.kt:48)
	at com.pinterest.ktlint.internal.KtlintCommandLine$lintFiles$3.invoke$lambda-1(KtlintCommandLine.kt:274)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

The output from the regular workflow:

[INFO] Running org.cqfn.diktat.ruleset.smoke.DiktatSaveSmokeTest
[WARN ] 2022-07-26 17:05:29 Make sure JAVA_HOME (/opt/hostedtoolcache/Java_Zulu_jdk/11.0.16-8/x64) points to a Java 8 or Java 11 home. Java 17 is not yet supported.
[INFO ] 2022-07-26 17:05:29 The base directory for the smoke test is /home/runner/work/diktat/diktat/diktat-rules/src/test/resources/test/smoke.
[INFO ] 2022-07-26 17:05:29 Downloading https://github.com/saveourtool/save-cli/releases/download/v0.3.2/save-0.3.2-linuxX64.kexe to save-0.3.2-linuxX64.kexe...
[INFO ] 2022-07-26 17:05:30 6016712 byte(s) copied in 235.426 ms.
[INFO ] 2022-07-26 17:05:30 Downloading https://github.com/pinterest/ktlint/releases/download/0.46.1/ktlint to ktlint...
[INFO ] 2022-07-26 17:05:32 63363704 byte(s) copied in 732.33 ms.
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 86.137 s - in org.cqfn.diktat.ruleset.smoke.DiktatSaveSmokeTest

The output from the release workflow:

[INFO] Running org.cqfn.diktat.ruleset.smoke.DiktatSaveSmokeTest
[WARN ] 2022-07-26 17:17:36 Make sure JAVA_HOME (/opt/hostedtoolcache/Java_Zulu_jdk/11.0.16-8/x64) points to a Java 8 or Java 11 home. Java 17 is not yet supported.
[INFO ] 2022-07-26 17:17:36 The base directory for the smoke test is /home/runner/work/diktat/diktat/diktat-rules/src/test/resources/test/smoke.
[INFO ] 2022-07-26 17:17:36 Downloading https://github.com/saveourtool/save-cli/releases/download/v0.3.2/save-0.3.2-linuxX64.kexe to save-0.3.2-linuxX64.kexe...
[INFO ] 2022-07-26 17:17:37 6016712 byte(s) copied in 230.523 ms.
[INFO ] 2022-07-26 17:17:37 Downloading https://github.com/pinterest/ktlint/releases/download/0.46.1/ktlint to ktlint...
[INFO ] 2022-07-26 17:17:40 63363704 byte(s) copied in 2780.787 ms.
Error:  Tests run: 15, Failures: 15, Errors: 0, Skipped: 0, Time elapsed: 31.537 s <<< FAILURE! - in org.cqfn.diktat.ruleset.smoke.DiktatSaveSmokeTest

Environment information

  • diktat version: 1.2.2-SNAPSHOT at 812406d
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added the bug Something isn't working label Jul 26, 2022
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added this to the 1.2.2 milestone Jul 26, 2022
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 27, 2022
### What's done:

 * Fixes #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
…eset`

### What's done:

 * Now it's possible to run `mvn clean install` w/o skipping tests.
 * Reverted ad66a04 (was useless in the 1st
   place).
 * Reverted ad66a04 (no longer necessary).
 * Partially reverted 54c8cce (no longer
   necessary).
 * See #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
### What's done:

 * See #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
### What's done:

 * See #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
### What's done:

 * See #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
…eset` (#1481)

### What's done:

 * Now it's possible to run `mvn clean install` w/o skipping tests.
 * Reverted ad66a04 (was useless in the 1st
   place).
 * Reverted a67811d (no longer necessary).
 * Partially reverted 54c8cce (no longer
   necessary).
 * See #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
…ntegration test

### What's done:

 * Finally, fixes #1478.
0x6675636b796f75676974687562 added a commit that referenced this issue Jul 28, 2022
…ntegration test (#1482)

### What's done:

 * Finally, fixes #1478.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment