Skip to content

Fix linter: using a local in an assertion.#723

Merged
sbarzowski merged 1 commit intogoogle:masterfrom
netomi:fix-linter-referencing-local-in-assertion
Jun 10, 2024
Merged

Fix linter: using a local in an assertion.#723
sbarzowski merged 1 commit intogoogle:masterfrom
netomi:fix-linter-referencing-local-in-assertion

Conversation

@netomi
Copy link
Copy Markdown
Contributor

@netomi netomi commented Aug 11, 2023

This fixes #617.

While working on the fix an existing test was discovered that outlines the same bug. It could be fixed after fixing the bug itself.

@sbarzowski sbarzowski merged commit e0c6a9e into google:master Jun 10, 2024
@netomi netomi deleted the fix-linter-referencing-local-in-assertion branch June 10, 2024 21:15
vhata pushed a commit to discord/go-jsonnet that referenced this pull request Aug 30, 2024
bejaratommy pushed a commit to bejaratommy/go-jsonnet that referenced this pull request Apr 11, 2026
Adds a test case demonstrating that a local variable defined in an outer
scope (outside the object) is correctly recognized as used when it appears
inside an object-level assert expression. Prevents regression of the fix
introduced in google#723.

Closes google#778
bejaratommy added a commit to bejaratommy/go-jsonnet that referenced this pull request Apr 11, 2026
Adds a test case demonstrating that a local variable defined in an outer
scope (outside the object) is correctly recognized as used when it appears
inside an object-level assert expression. Prevents regression of the fix
introduced in google#723.

Closes google#778
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.

Asserted variable considered unused

2 participants