Skip to content

Incorrect Line Numbering for Test Query Syntax Errors #315

@bgribaudo

Description

@bgribaudo

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: #286

Metadata

Metadata

Assignees

Labels

sdk toolsIssue is related to the SDK Tools external nuget packages

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions