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

format: ensure future keyword import with in #4115

Merged
merged 1 commit into from Dec 9, 2021

Conversation

srenatus
Copy link
Contributor

@srenatus srenatus commented Dec 9, 2021

When a module is formatted that has calls to internal.member_2 or
internal.member_3, which get pretty-printed as infix in operator
calls, the formatter now ensures that the corresponding future keyword
import is present.


Fixes #4111.

@srenatus srenatus marked this pull request as ready for review December 9, 2021 10:35
tsandall
tsandall previously approved these changes Dec 9, 2021
Copy link
Member

@tsandall tsandall left a comment

Choose a reason for hiding this comment

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

One comment on the import check, otherwise LGTM. I like the individual test cases--those are much more maintainable.

format/format.go Outdated Show resolved Hide resolved
When a module is formatted that has calls to `internal.member_2` or
`internal.member_3`, which get pretty-printed as infix `in` operator
calls, the formatter now ensures that the corresponding future keyword
import is present.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
@srenatus srenatus merged commit 9795126 into open-policy-agent:main Dec 9, 2021
@srenatus srenatus deleted the sr/fix-4111 branch December 9, 2021 17:12
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.

Opa policy bundle with optimizations and future.keywords
2 participants