microsoft / microsoft/vscode-powerquery-sdk

Incorrect Line Numbering for Test Query Syntax Errors

Open
#315 2 comments 0 reactions 1 assignee View on GitHub

@mattmasson is already working on this.

Since Mar 19, 2024.

sdk tools
Dominant language
TypeScript
Stars
92
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Preflight Checklist
Power Query SDK

0.3.1

Regression From

No response

Platform

All

Architecture

x64

OS Version

No response

VSCode version

No response

PQSdkTool Path

No response

Bug Description

When a '.test.pq' file contains a syntax error, the error is reported (good) but the line number reported for it does not necessarily correspond to the location of the error in the '.test.pq' file.

Steps to Reproduce
  1. Create a new PQ SDK project.
  2. Set the '.test.pq' file's contents to:
    [a
    =
    3 +]
    
  3. Evaluate the '.test.pq' file.

Notice that the error is reported as occurring on line 4, when the problem is actually on line 3.

Actual Experience

Evaluation dies with:

Token Literal expected. Start position: (4, 4). End position (4, 5).
Expected Experience

Error's start and end position should reflect line 3, not line 4.

Additional Context

Related: https://github.com/microsoft/vscode-powerquery-sdk/issues/286

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.