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

[LANGUAGE] Warning unused var #4881

Merged
merged 41 commits into from
Dec 13, 2023
Merged

[LANGUAGE] Warning unused var #4881

merged 41 commits into from
Dec 13, 2023

Conversation

Felienne
Copy link
Member

@Felienne Felienne commented Dec 9, 2023

Fixes #2394 (finally!!) by checking if declared variables are actually used, also fixes #4884 that was introduced here.

Depends-On: #4880

How to test

I have added a test for the exception. To see it in action on the front-end, run code that defines but not uses a variable, and observe you get a warning but the code still runs:

image

Note that this PR needs #4880 to show the warning in the front-end!

@ghost
Copy link

ghost commented Dec 9, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@Felienne Felienne mentioned this pull request Dec 11, 2023
@Felienne Felienne requested a review from jpelay December 11, 2023 09:47
@Felienne Felienne marked this pull request as ready for review December 11, 2023 09:48
Copy link
Member

@jpelay jpelay left a comment

Choose a reason for hiding this comment

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

I tested it and this works great! I wonder if in the future we'd want to show the user several warnings or errors at the same time? Or do you think this would overwhelm them?

Copy link
Contributor

mergify bot commented Dec 12, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@Felienne
Copy link
Member Author

I tested it and this works great! I wonder if in the future we'd want to show the user several warnings or errors at the same time? Or do you think this would overwhelm them?

Ow great question! I have to think about that a bit more!

Copy link
Contributor

mergify bot commented Dec 13, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit fe822d1 into main Dec 13, 2023
11 checks passed
@mergify mergify bot deleted the warning-unused-var branch December 13, 2023 06:36
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.

[BUG] More broken fix faulty tests [LANGUAGE] Add warning for unused variables
3 participants