Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Explicit assertions no longer considered implicit for code actions #6030

Merged
merged 8 commits into from
Jan 13, 2025

Conversation

MikaelMayer
Copy link
Member

Fixes #6025

What was changed?

Explicit assertions (which as of today are prefixed with ensures and assert) are no longer suggested in code actions where the same expression fails. This was redundant and useless.

How has this been tested?

I added a test for the language server in the assertion case, verified that this test did not pass before the change, and the test passes after the change.
Since ensures are also explicit assertions, I added a test for them as well. However, the test does not work if the ensures is not on the same line as the opening curly brace. I don't know why, but for now I'm writing the test in a way that was surely failing before and now passes.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Copy link
Member

@keyboardDrummer keyboardDrummer left a comment

Choose a reason for hiding this comment

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

Looks good but there are some CI failures

@MikaelMayer MikaelMayer added the run-integration-tests Forces running the CI for integration tests even if the deep tests fail label Jan 9, 2025
@keyboardDrummer keyboardDrummer enabled auto-merge (squash) January 13, 2025 09:03
@MikaelMayer MikaelMayer disabled auto-merge January 13, 2025 11:09
@MikaelMayer MikaelMayer enabled auto-merge (squash) January 13, 2025 11:10
@MikaelMayer MikaelMayer merged commit 416575a into master Jan 13, 2025
21 of 22 checks passed
@MikaelMayer MikaelMayer deleted the fix-6025-assert-code-action branch January 13, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-integration-tests Forces running the CI for integration tests even if the deep tests fail
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Useless and distracting code action
2 participants