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

Improve expression validation for short-circuiting expressions #15

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

cschleiden
Copy link
Contributor

With this change we are removing the short-circuiting behavior of the expression validate. Previously for an expression like

${{ github.does-not-exist || github.foo }}

we showed only the first invalid context access, not the second one since we were using the unmodified expression evaluator and that's the correct behavior at run-/evaluation time. Now we are removing that behavior during validation and capture more of the errors.

We could also provide more targeted error ranges, like highlighting only the specific part of the extension that's invalid, similar to the hover behavior but that's left for a future change.

CleanShot.2023-04-05.at.13.53.00.mp4

Closes: github/vscode-github-actions#61

@cschleiden cschleiden requested a review from a team as a code owner April 5, 2023 20:56
@joshmgross joshmgross requested review from a team and removed request for a team April 5, 2023 21:14
@cschleiden cschleiden merged commit fe25433 into main Apr 5, 2023
@cschleiden cschleiden deleted the cschleiden/improve-expression-validation2 branch April 5, 2023 23:06
@github-actions github-actions bot mentioned this pull request May 2, 2023
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.

Workflow expression variable reference checks miss some variables
2 participants