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

fmt: functions — don't add virtual = true value unless provided #6323

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

anderseknert
Copy link
Member

This is especially nice for functions doing pattern matching on equality in its arguments.

Previously, we'd rewrite:

f(1)

into

f(1) = true

Now, we'll leave the shorter form alone, while still respecting explicit assignment, using either = or :=.

This is especially nice for functions doing pattern matching on
equality in its arguments.

Previously, we'd rewrite:

```rego
f(1)
```

into

```rego
f(1) = true
```

Now, we'll leave the shorter form alone, while still respecting
explicit assignment, using either `=` or `:=`.

Signed-off-by: Anders Eknert <anders@eknert.com>
@anderseknert anderseknert merged commit 0cad9f9 into open-policy-agent:main Oct 17, 2023
24 checks passed
@anderseknert anderseknert deleted the fun-format branch October 17, 2023 09:17
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.

None yet

2 participants