Skip to content

[0.1.7] Fix error display when docscribe fails and trailing literal suppresses warnings - #57

Merged
unurgunite merged 2 commits into
v0.1.7from
fix/annotator-error-display
Sep 9, 2026
Merged

unurgunite merged 2 commits into
v0.1.7from
fix/annotator-error-display

Conversation

@unurgunite

@unurgunite unurgunite commented Sep 8, 2026

Copy link
Copy Markdown
Member

Description

Fixes the annotator swallowing docscribe failures and the trailing-literal cache bug. When docscribe exits with an error (missing gem, syntax error, or error_count>0 with no files) the previous code cached an empty result and rendered it as 0 — the real error was only visible in the daemon. Now failures are surfaced and not cached.

Changes

  • DocscribeAnnotator.doAnnotate no longer treats !success as null with 0 offenses. Failed runs log success/exit/stderr to idea.log, show a visible annotation, and are not cached. A blank stdout with success is still cached as a clean file.
  • error_count>0 && files.isEmpty() (e.g. parser error or trailing []/:sym/42 suppressing InvalidType) now creates a synthetic Docscribe/Error offense on line 1 instead of being collapsed to null and hidden.
  • The synthetic error path is excluded from DocscribeAnnotatorCache to avoid poisoning the cache and to allow the next annotation to retry the daemon.
  • gem not installed (exit 2, stderr contains docscribe gem is not installed) is now shown as a BALLOON WARNING with an Add to Gemfile action that appends gem "docscribe" to the project Gemfile root (so CI picks it up) and opens the file, mirroring RuboCop's UX. fatal and parser errors remain as red ERROR squiggles.

Checklist

  • Tests pass (./gradlew test — 238 tests)
  • Formatting clean (./gradlew spotlessCheck)
  • Static analysis clean (./gradlew detekt)
  • Plugin verified (./gradlew verifyPlugin against 261.* / 262.*)
  • CHANGELOG updated (if applicable)

@unurgunite unurgunite self-assigned this Sep 8, 2026
@unurgunite unurgunite added the enhancement New feature or request label Sep 8, 2026
@unurgunite
unurgunite force-pushed the fix/annotator-error-display branch from 5d5f71e to f12573b Compare September 8, 2026 23:11
@unurgunite
unurgunite merged commit 9030ede into v0.1.7 Sep 9, 2026
1 check passed
@unurgunite
unurgunite deleted the fix/annotator-error-display branch September 9, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant