Skip to content

Fixed some completions close to end of files #1356

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

Merged
merged 3 commits into from
Jul 3, 2025

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Jul 3, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 17:55
Copy link
Contributor

@Copilot 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 adds a helper to compute the end-of-line position for a given offset, updates existing logic to use it, and re-enables a suite of previously skipped fourslash tests by removing t.Skip() calls and updating the failing-tests registry.

  • Introduced getLineEndOfPosition and replaced relevant calls in completions.go.
  • Changed an ancestor lookup to use the correct location parameter.
  • Removed t.Skip() from multiple tests and synchronized failingTests.txt.

Reviewed Changes

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

Show a summary per file
File Description
internal/ls/completions.go Added getLineEndOfPosition and updated two call sites
internal/fourslash/tests/gen/satisfiesOperatorCompletion_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionsNonExistentImport_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionsImportDefaultExportCrash1_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionListInUnclosedFunction11_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionListInUnclosedFunction10_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionListInFunctionDeclaration_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionListForUnicodeEscapeName_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionAfterNewline_test.go Re-enabled test by removing t.Skip()
internal/fourslash/tests/gen/completionAfterNewline2_test.go Re-enabled test by removing t.Skip()
internal/fourslash/_scripts/failingTests.txt Updated list to match newly enabled/disabled tests
Comments suppressed due to low confidence (2)

internal/ls/completions.go:2186

  • The explicit semicolon after the function call is unnecessary in Go and should be removed to match the project's style conventions.
	line := getLineOfPosition(file, pos);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry for the noisy diff here - I sorted this list to help with diffing when comparing this list against the list of all current failing test cases. Upon reques, I can revert that change and just remove the newly passing tests surgically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my process was a little bit manual when it comes to this, maybe there is a better one to learn what can be unskipped? cc @gabritto

Copy link
Member

Choose a reason for hiding this comment

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

I usually just run a command in the terminal to sort/deduplicate this as part of updating. What I really need to do is to add a script or something to update the failing tests list. I'll do that soon, but meanwhile you can do whatever is easiest.

@gabritto gabritto added this pull request to the merge queue Jul 3, 2025
Merged via the queue into microsoft:main with commit 69a1fc5 Jul 3, 2025
22 checks passed
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.

2 participants