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

Followup to #870 #910

Merged
merged 1 commit into from
May 24, 2024
Merged

Followup to #870 #910

merged 1 commit into from
May 24, 2024

Conversation

khieta
Copy link
Contributor

@khieta khieta commented May 24, 2024

Description of changes

Followup to #870, which did not entirely fix #862, as identified by nightly fuzzing. My bad 😅

The issue was that the regular expression for strings matched all content up until the newline after the final quotation, which might end up splitting strings. I had added the extra [^\n]* when I was testing the original design, and forgot to remove it. The regular expression for strings now exactly matches the one used elsewhere in the formatter.

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A bug fix or other functionality change requiring a patch to cedar-policy.

I confirm that this PR (choose one, and delete the other options):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

@khieta
Copy link
Contributor Author

khieta commented May 24, 2024

Note: downstream DRT failure is unrelated to this PR (it's due to #898)

@khieta khieta merged commit 7ad7ad7 into main May 24, 2024
15 of 17 checks passed
@khieta khieta deleted the khieta/formatter-fix-v2 branch May 24, 2024 16:18
@shaobo-he-aws
Copy link
Contributor

I will cherry-pick it into 3.2.x.

shaobo-he-aws pushed a commit that referenced this pull request May 24, 2024
shaobo-he-aws pushed a commit that referenced this pull request May 28, 2024
shaobo-he-aws added a commit that referenced this pull request May 28, 2024
Signed-off-by: Shaobo He <shaobohe@amazon.com>
Co-authored-by: Kesha Hietala <khieta@amazon.com>
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.

Policy formatter drops empty lines in multi-line strings
3 participants