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: correctly report error position on unknown directive without values #3518

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

kasiaMarek
Copy link
Collaborator

This PR changes positions in unrecognised directives errors.
fixes: #3389

Previously

Errors used to be reported on values:

Unrecognized directive: wrong.directive with values: value
//> using wrong.directive value
                          ^^^^^

which resulted also in two errors for two values:

Unrecognized directive: wrong.directive with values: value1, value2
//> using wrong.directive value1 value2
                          ^^^^^^
Unrecognized directive: wrong.directive with values: value1, value2
//> using wrong.directive value1 value2
                                 ^^^^^^

and incorrect position for no values.

Now

We use directive position for error report:

Unrecognized directive: wrong.directive with values: value1, value2
//> using wrong.directive value1 value2
          ^^^^^^^^^^^^^^^

Copy link
Contributor

@Gedochao Gedochao left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gedochao Gedochao enabled auto-merge (squash) February 26, 2025 09:33
@Gedochao Gedochao merged commit 9d6e4e1 into VirtusLab:main Feb 26, 2025
72 of 77 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
2 participants