Skip to content

refactor(linter/plugins): remove unnecessary debug assertions#18764

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions
Jan 31, 2026
Merged

refactor(linter/plugins): remove unnecessary debug assertions#18764
graphite-app[bot] merged 1 commit intomainfrom
om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 31, 2026

Pure refactor. Remove 2 unnecessary debugAssertIsNonNull calls. In both cases the null check already happens directly above.

Copy link
Member Author

overlookmotel commented Jan 31, 2026

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 31, 2026
@overlookmotel overlookmotel marked this pull request as ready for review January 31, 2026 13:15
Copilot AI review requested due to automatic review settings January 31, 2026 13:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes two redundant debug assertions from the oxlint CLI plugin system. Both debugAssertIsNonNull calls were checking variables that are already guaranteed to be non-null by explicit null checks in the lines immediately above them.

Changes:

  • Removed unnecessary debugAssertIsNonNull(loadPlugin) assertion in loadPluginWrapper function
  • Removed unnecessary debugAssertIsNonNull(createWorkspace) assertion in createWorkspaceWrapper function

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

@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from c35b070 to 64be55c Compare January 31, 2026 13:49
@overlookmotel overlookmotel force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from 6bf2be9 to 548af61 Compare January 31, 2026 13:49
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 64be55c to e13fa60 Compare January 31, 2026 14:13
@overlookmotel overlookmotel force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from 548af61 to a898a2a Compare January 31, 2026 14:13
@overlookmotel overlookmotel force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from a898a2a to 659ba06 Compare January 31, 2026 15:15
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from e13fa60 to 8374b33 Compare January 31, 2026 15:15
@camc314 camc314 force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from 659ba06 to deb2e34 Compare January 31, 2026 15:25
@connorshea
Copy link
Member

This PR includes a bunch of changes from main, it looks like?

@camc314 camc314 force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from deb2e34 to 715c763 Compare January 31, 2026 16:22
@camc314 camc314 force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 8374b33 to 922d883 Compare January 31, 2026 16:22
@graphite-app graphite-app bot force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from 715c763 to d3594e2 Compare January 31, 2026 16:42
@graphite-app graphite-app bot force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 922d883 to 85c0c93 Compare January 31, 2026 16:42
@camc314 camc314 force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 85c0c93 to 1e160fc Compare January 31, 2026 16:46
@camc314 camc314 force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from d3594e2 to eb36fa9 Compare January 31, 2026 16:46
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
Copy link
Contributor

camc314 commented Jan 31, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch 2 times, most recently from e85246b to 2a752a8 Compare January 31, 2026 17:00
@graphite-app graphite-app bot force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 1e160fc to 5a93dfc Compare January 31, 2026 17:00
@camc314 camc314 force-pushed the om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ branch from 2a752a8 to 6cebe6f Compare January 31, 2026 17:04
@graphite-app graphite-app bot changed the base branch from om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ to graphite-base/18764 January 31, 2026 17:10
@camc314 camc314 force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 5a93dfc to 8584f01 Compare January 31, 2026 19:56
@camc314 camc314 force-pushed the graphite-base/18764 branch from 2a752a8 to 1d98417 Compare January 31, 2026 19:56
@camc314 camc314 changed the base branch from graphite-base/18764 to om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ January 31, 2026 19:56
@graphite-app graphite-app bot changed the base branch from om/01-31-fix_linter_plugins_handle_error_from_destroyworkspace_ to graphite-base/18764 January 31, 2026 20:05
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
@graphite-app graphite-app bot changed the base branch from graphite-base/18764 to main January 31, 2026 20:15
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
Pure refactor. Remove 2 unnecessary `debugAssertIsNonNull` calls. In both cases the `null` check already happens directly above.
@graphite-app graphite-app bot force-pushed the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch from 8584f01 to 6ecfc73 Compare January 31, 2026 20:16
@graphite-app graphite-app bot merged commit 6ecfc73 into main Jan 31, 2026
20 checks passed
@graphite-app graphite-app bot deleted the om/01-31-refactor_linter_plugins_remove_unnecessary_debug_assertions branch January 31, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments