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

Editing an ignored file shows completion errors #879

Closed
anderseknert opened this issue Jul 1, 2024 · 0 comments · Fixed by #953
Closed

Editing an ignored file shows completion errors #879

anderseknert opened this issue Jul 1, 2024 · 0 comments · Fixed by #953
Labels
bug Something isn't working language server protocol

Comments

@anderseknert
Copy link
Member

Despite the file being ignored, an error is displayed for each time a key is prressed:

[Error - 10:18:53 AM] Request textDocument/completion failed.
  Message: failed to find completions: error running completion provider: could not get file contents for: file:///Users/anderseknert/git/styra/regal/e2e/testdata/violations/most_violations.rego
  Code: 0 
@anderseknert anderseknert added bug Something isn't working language server protocol labels Jul 1, 2024
@anderseknert anderseknert moved this to TODO in Regal Jul 6, 2024
charlieegan3 added a commit to charlieegan3/regal that referenced this issue Jul 30, 2024
When files are ignored, they will have no file contents in the cache,
and so completions are impossible. This leads to an error message which
is now avoided by just returning an empty list.

Fixes StyraInc#879

Signed-off-by: Charlie Egan <charlie@styra.com>
anderseknert pushed a commit that referenced this issue Jul 30, 2024
When files are ignored, they will have no file contents in the cache,
and so completions are impossible. This leads to an error message which
is now avoided by just returning an empty list.

Fixes #879

Signed-off-by: Charlie Egan <charlie@styra.com>
@github-project-automation github-project-automation bot moved this from TODO to Done in Regal Jul 30, 2024
srenatus pushed a commit to srenatus/regal that referenced this issue Oct 1, 2024
When files are ignored, they will have no file contents in the cache,
and so completions are impossible. This leads to an error message which
is now avoided by just returning an empty list.

Fixes StyraInc#879

Signed-off-by: Charlie Egan <charlie@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language server protocol
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant