Skip to content

Conversation

adpaco-aws
Copy link
Contributor

Description of changes

This PR extends unknown method errors with a hint that suggests the closest method from the ones available based on the fuzzy string matching algorithm used to make similar suggestions. This recommendation uses the "limited" version of the fuzzy matching algorithm to avoid suggestions which wouldn't be too helpful. To put it simply, this PR is like #1280 but for methods.

Resolves #246

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):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

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.

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar language specification.

Signed-off-by: Adrian Palacios <accorell@amazon.com>
Signed-off-by: Adrian Palacios <accorell@amazon.com>
@adpaco-aws adpaco-aws changed the title Suggest methods too Suggest method in unknown extension method errors Oct 23, 2024
Signed-off-by: Adrian Palacios <accorell@amazon.com>
@adpaco-aws adpaco-aws merged commit 632860a into cedar-policy:main Oct 24, 2024
16 of 19 checks passed
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.

Fuzzy matching on unknown method error message
3 participants