Skip to content

refactor(linter/plugins): add message param to debugAssertIsNonNull#17170

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/12-19-refactor_linter_plugins_add_message_argument_to_debugassertisnonnull_
Dec 20, 2025
Merged

refactor(linter/plugins): add message param to debugAssertIsNonNull#17170
graphite-app[bot] merged 1 commit intomainfrom
om/12-19-refactor_linter_plugins_add_message_argument_to_debugassertisnonnull_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 20, 2025

Add message param to debugAssertIsNonNull, so you can provide a custom error message, same as debugAssert.

@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 Dec 20, 2025
Copy link
Member Author

overlookmotel commented Dec 20, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel changed the title refactor(linter/plugins): add message argument to debugAssertIsNonNull refactor(linter/plugins): add message param to debugAssertIsNonNull Dec 20, 2025
@overlookmotel overlookmotel marked this pull request as ready for review December 20, 2025 13:01
Copilot AI review requested due to automatic review settings December 20, 2025 13:01
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 refactors the debugAssertIsNonNull function to accept an optional message parameter, bringing it into alignment with the similar debugAssert function. This allows developers to provide custom error messages for failed assertions, making debugging easier.

Key changes:

  • Added optional message parameter to debugAssertIsNonNull that accepts either a string or a function returning a string
  • Updated documentation with examples showing lazy message evaluation using a function
  • Modified implementation to handle the new message parameter while maintaining backward compatibility

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

@overlookmotel overlookmotel self-assigned this Dec 20, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 20, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 20, 2025

Merge activity

…l` (#17170)

Add `message` param to `debugAssertIsNonNull`, so you can provide a custom error message, same as `debugAssert`.
@graphite-app graphite-app bot force-pushed the om/12-19-refactor_linter_plugins_add_message_argument_to_debugassertisnonnull_ branch from da5af09 to f0d6b70 Compare December 20, 2025 13:59
@graphite-app graphite-app bot merged commit f0d6b70 into main Dec 20, 2025
18 checks passed
@graphite-app graphite-app bot deleted the om/12-19-refactor_linter_plugins_add_message_argument_to_debugassertisnonnull_ branch December 20, 2025 14:05
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 20, 2025
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.

3 participants