Skip to content

fix(no-nullable-type-assertion-style): use suggestion instead of fix#956

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/non-nullable-type-assertion-suggestion
May 15, 2026
Merged

fix(no-nullable-type-assertion-style): use suggestion instead of fix#956
graphite-app[bot] merged 1 commit into
mainfrom
codex/non-nullable-type-assertion-suggestion

Conversation

@camc314

@camc314 camc314 commented May 15, 2026

Copy link
Copy Markdown
Contributor

fixes #954

Copilot AI review requested due to automatic review settings May 15, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the non-nullable-type-assertion-style rule to emit a suggestion (with associated fixes) instead of providing an automatic fix, aligning the rule’s output with a “suggested fix” UX and updating tests/snapshots accordingly.

Changes:

  • Switch rule reporting from ReportNodeWithFixes to ReportNodeWithSuggestions, packaging the existing fix operations as a single suggestion.
  • Update rule unit tests to assert suggestion output rather than auto-fix output.
  • Update rule tester + e2e snapshots to reflect suggestions instead of top-level fixes in diagnostics.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
internal/rules/non_nullable_type_assertion_style/non_nullable_type_assertion_style.go Report non-null assertion conversion as a suggestion and consolidate fix construction.
internal/rules/non_nullable_type_assertion_style/non_nullable_type_assertion_style_test.go Update invalid cases to validate suggestions (message + applied output) instead of auto-fix outputs.
internal/rule_tester/snapshots/non-nullable-type-assertion-style.snap Refresh snapshots to include “Suggestion 1 …” lines for the rule tester output.
e2e/snapshots/snapshot.test.ts.snap Refresh e2e snapshot JSON diagnostics to include suggestions instead of fixes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@camc314 camc314 changed the title [codex] Use suggestion for non-nullable type assertion style fix(no-nullable-): use suggestion for non-nullable type assertion style May 15, 2026
@camc314 camc314 changed the title fix(no-nullable-): use suggestion for non-nullable type assertion style fix(no-nullable-type-assertion-style): use suggestion instead of fix May 15, 2026
@camc314 camc314 requested a review from Copilot May 15, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@camc314 camc314 self-assigned this May 15, 2026

camc314 commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@graphite-app graphite-app Bot force-pushed the codex/non-nullable-type-assertion-suggestion branch from cc84e82 to 8bd37ab Compare May 15, 2026 08:14
@graphite-app graphite-app Bot merged commit 8bd37ab into main May 15, 2026
9 checks passed
@graphite-app graphite-app Bot removed the 0-merge label May 15, 2026
@graphite-app graphite-app Bot deleted the codex/non-nullable-type-assertion-suggestion branch May 15, 2026 08:22
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.

Bug: non-nullable-type-assertion-style false positive for generic functions

2 participants