buildfoundation/bazel_rules_detekt

Detekt stdout/stderr is not visible

Closed this issue · 2 comments

I'm migrating from 0.2.0 (which didn't include the persistent worker) to the latest HEAD (ebc7cc6), and everything works fine... Unless I go above the threshold defined in Detekt's config file. The reports then fail to build (as expected), but I don't get any useful output:

bazel build //java/fr/enoent/fs:file_watcher_detekt_report
INFO: Invocation ID: b4f6729f-50da-4230-979a-9c3e6d9cf911
INFO: Build option --action_env has changed, discarding analysis cache.
INFO: Analyzed target //java/fr/enoent/fs:file_watcher_detekt_report (4 packages loaded, 1907 targets configured).
INFO: Found 1 target...
ERROR: /home/kernald/dev/esp-media-remote/java/fr/enoent/fs/BUILD:3:1: Detekt java/fr/enoent/fs/file_watcher_detekt_report_detekt_report.txt failed (Exit 1)
io.gitlab.arturbosch.detekt.cli.BuildFailure: Build failed with 1 weighted issues (threshold defined was 0).
Target //java/fr/enoent/fs:file_watcher_detekt_report failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.068s, Critical Path: 0.15s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

Interestingly enough, setting --spawn_strategy=local or --spawn_strategy=worker doesn't make any difference.

Just to double-check, I tried with Detekt 1.3.0 (which was the version used by default at the time the version 0.2.0 of the rules was released, as far as I can tell), it doesn't make any difference.

Yes, this is an oversight caused by the worker implementation. We had an internal feedback about it as well. I’m looking into it, thanks for the report!