Skip to content

[0.1.7] Filter InvalidType when warn off - #63

Merged
unurgunite merged 1 commit into
v0.1.7from
feature/warn-toggle-filter
Sep 18, 2026
Merged

unurgunite merged 1 commit into
v0.1.7from
feature/warn-toggle-filter

Conversation

@unurgunite

Copy link
Copy Markdown
Member

Description

Hides syntax-driven Docscribe/InvalidType annotations when the "Warn on invalid YARD types" setting is off. RBS-sourced InvalidType offenses always stay visible.

Previously the toggle only controlled the --validate-types CLI flag, which gates mismatch-vs-inferred reporting in the gem. Syntax-broken YARD types are always emitted by the gem, so turning the setting off had no visible effect in the editor.

Changes:

  • DocscribeAnnotator.apply skips non-RBS InvalidType offenses when the setting is off (with an info log line per skip)
  • New isInvalidYardHidden helper with unit tests (setting on/off, null source, RBS source, other cops)
  • Updated GUI test case 3h5 to assert the skip log line as the OFF oracle

Checklist

  • Tests pass (./gradlew test — 273 tests, 0 failures, including 5 new warn-toggle tests)
  • Formatting clean (./gradlew spotlessCheck)
  • Static analysis clean (./gradlew detekt — fails on a clean tree too with Could not initialize class com.intellij.ide.plugins.PluginEnabler, environment issue, unrelated to this change)
  • Plugin verified (./gradlew verifyPlugin — not run in this session)
  • CHANGELOG updated — N/A, bug fix covered by existing changelog entry

Screenshots (if applicable)

N/A — verified live in VM (case 3h5 green: highlight plus quick-fix when on, skip log line when off).

@unurgunite unurgunite self-assigned this Sep 18, 2026
@unurgunite
unurgunite merged commit e1507ca into v0.1.7 Sep 18, 2026
1 check passed
@unurgunite
unurgunite deleted the feature/warn-toggle-filter branch September 18, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant