Skip to content

Refactor lang.ReferencesInExpr #2142

Open
@ghost

Description

A lot of places in the code call lang.ReferencesInExpr in a way that ignores any diags returned. This is an antipattern because we are ignoring potential errors. However, this is fine because in the cases where it is used this way, the error doesn't need to be handled.

In order to not propagate bad coding habits, we want to create a secondary function (possibly lang.TryReferencesInExpr) that encapsulates ignoring the diags and replace all calls ignoring errors with this new function. This new function should have enough comments to explain why this function needs to exist.

Metadata

Metadata

Assignees

Labels

acceptedThis issue has been accepted for implementation.enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions