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

Regex pattern for ignore_keys in JSON comparison is not always effective #52

Closed
ChingT opened this issue May 2, 2024 · 2 comments
Closed

Comments

@ChingT
Copy link

ChingT commented May 2, 2024

I've configured a file with the following settings:

rules:
  - name: "Compare JSON files"
    pattern_include:
      - "**/*.json"
    Json:
      ignore_keys:
        - "^[a-zA-Z]+Id$"

Despite this configuration, the comparison results still show keys like xxxId, which should have been ignored based on the specified regex pattern. However, some keys containing Id do get ignored.

@ChrisRega
Copy link
Contributor

ChrisRega commented May 5, 2024

Fixed in new json-diff-ng, will bring havocompare pr tonight from draft tonight. New 0.6.0 series (see draft pr) will introduce the fix.

@rohdealx
Copy link
Collaborator

rohdealx commented May 6, 2024

#50 is merged now, and included in the published 0.6.0 patch.

@rohdealx rohdealx closed this as completed May 6, 2024
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

No branches or pull requests

3 participants