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

Lack of documentation for metadataDuplicateFindKeys property #339

Closed
przemekrcloudity opened this issue Mar 29, 2023 · 4 comments
Closed

Comments

@przemekrcloudity
Copy link
Contributor

Hi! I think that documentation for metadataDuplicateFindKeys property is missing.

Today I installed your pluign and tried to test duplicate metadata detection logic.
I created duplicate label in force-app/main/default/labels/CustomLabels.labels-meta.xmll file and after running

sfdx hardis:project:metadata:findduplicates

I got:

[sfdx-hardis] Start finding duplicate values in XML metadata files.
[sfdx-hardis] Done finding duplicate values in XML metadata files.
[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.375

When I tried to run the same command with --help flag, help page mentioned that I need to specify which files I want to check using metadataDuplicateFindKeys. property in config file but there is no mention of this property in config documentation.

@nvuillam
Copy link
Member

@clemfernandez any thoughts to reply to @przemekrcloudity ? :)

@clemfernandez
Copy link
Contributor

@przemekrcloudity you're right the property wasn't well documented.

I just created a PR to fix that, in the meantime you can use it like so :

{
  "metadataDuplicateFindKeys": {
    "layout": [
      "Layout.layoutSections.layoutColumns.layoutItems.field",
      "Layout.quickActionListItems.quickActionName"
    ],
    "profile": [
      "Profile.fieldPermissions.field"
    ]
  }
}

@nvuillam
Copy link
Member

@przemekrcloudity if you detect other checks that could be added by default, don't hesitate to add a PR to update here ->

layout: ["Layout.layoutSections.layoutColumns.layoutItems.field", "Layout.quickActionListItems.quickActionName"],
:)

@przemekrcloudity
Copy link
Contributor Author

Thanks, configuration linked here worked like a charm

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